Skip to content

Commit b589212

Browse files
committed
feat(create-gen-app): add CLOSED license option for all rights reserved
Add a new CLOSED license template that provides an 'All Rights Reserved' option for proprietary/closed-source projects. This complements the existing open source license options (MIT, Apache-2.0, ISC, GPL-3.0, BSD-3-Clause, MPL-2.0, Unlicense). - Add CLOSED.txt license template with standard all rights reserved text - Update tests to verify CLOSED license rendering Co-Authored-By: Dan Lynch <[email protected]>
1 parent 9aac458 commit b589212

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

packages/create-gen-app/__tests__/licenses.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,19 @@ describe('license templates', () => {
3030
'BSD-3-CLAUSE',
3131
'UNLICENSE',
3232
'MPL-2.0',
33+
'CLOSED',
3334
])
3435
);
3536
});
3637

38+
it('renders CLOSED license with author and email', () => {
39+
const content = renderLicense('CLOSED', context);
40+
expect(content).toContain('Test User');
41+
expect(content).toContain('<[email protected]>');
42+
expect(content).toContain('2099');
43+
expect(content).toContain('All Rights Reserved');
44+
});
45+
3746
it('handles case-insensitive lookups', () => {
3847
expect(isSupportedLicense('mit')).toBe(true);
3948
expect(renderLicense('mit', { author: 'User' })).toContain('User');
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) {{YEAR}} {{AUTHOR}}{{EMAIL_LINE}}
2+
3+
All Rights Reserved.
4+
5+
This software and associated documentation files (the "Software") are the
6+
exclusive property of the copyright holder. No part of the Software may be
7+
reproduced, distributed, modified, or transmitted in any form or by any means,
8+
including photocopying, recording, or other electronic or mechanical methods,
9+
without the prior written permission of the copyright holder.
10+
11+
Unauthorized copying, modification, distribution, or use of this Software,
12+
via any medium, is strictly prohibited.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.

0 commit comments

Comments
 (0)