@carchalabs/seal-quickstart 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,12 @@
1
- MIT License
1
+ Carcha Seal SDK
2
+ Copyright (c) 2026 Bugra Omer Aydemir (Carcha Labs). All rights reserved.
2
3
 
3
- Copyright (c) 2026 Bugra Omer Aydemir
4
+ This software is proprietary. You may use, copy and distribute it only as section 5 (the SDK license) of the
5
+ Carcha Seal Vendor Terms allows: https://seal.carchalabs.com/terms/. You accept those terms by creating a Carcha
6
+ Seal account or by using this software.
4
7
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
8
+ Open-source components included in this software are licensed under their own licenses, reproduced in
9
+ THIRD-PARTY-NOTICES.txt where a package contains any.
11
10
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
11
+ Earlier versions keep the license they were published with: versions published before 7 November 2026 are under
12
+ the MIT License; versions published on 7 November 2026 are under the Carcha Seal SDK License 1.0.
package/README.md CHANGED
@@ -23,4 +23,4 @@ Try [Carcha Seal](https://seal.carchalabs.com) (formerly LicenseKit) from a term
23
23
 
24
24
  The quickstart sends the license key, a hash of this computer's machine ID, the device name "Carcha Seal quickstart" and the platform. It saves the lease without encryption in the per-user application data folder, because a terminal has no system keychain. See the [privacy notice](https://seal.carchalabs.com/privacy/).
25
25
 
26
- Requires Node 22.13 or later. MIT License.
26
+ Requires Node 22.13 or later. Proprietary: use under the [Carcha Seal Vendor Terms](https://seal.carchalabs.com/terms/) ([LICENSE](LICENSE)).
package/dist/bin.js CHANGED
@@ -8,4 +8,3 @@ const cli_1 = require("./cli");
8
8
  console.error(error instanceof Error ? error.message : String(error));
9
9
  process.exitCode = 1;
10
10
  });
11
- //# sourceMappingURL=bin.js.map
package/dist/cli.d.ts CHANGED
@@ -2,6 +2,8 @@ import { SealOptions } from '@carchalabs/seal-electron';
2
2
  export declare const PRODUCT = "licensekit-demo";
3
3
  export declare const DEFAULT_SERVER_URL = "https://seal.carchalabs.com";
4
4
  export declare const DEVICE_NAME = "Carcha Seal quickstart";
5
+ /** Sent as the app version, so the console shows which quickstart each device ran. */
6
+ export declare const QUICKSTART_VERSION: string;
5
7
  export interface RunOptions {
6
8
  out: (line: string) => void;
7
9
  storageDir?: string;
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEVICE_NAME = exports.DEFAULT_SERVER_URL = exports.PRODUCT = void 0;
3
+ exports.QUICKSTART_VERSION = exports.DEVICE_NAME = exports.DEFAULT_SERVER_URL = exports.PRODUCT = void 0;
4
4
  exports.bundledPublicKeys = bundledPublicKeys;
5
5
  exports.defaultStorageDir = defaultStorageDir;
6
6
  exports.run = run;
@@ -12,6 +12,9 @@ exports.PRODUCT = 'licensekit-demo';
12
12
  exports.DEFAULT_SERVER_URL = 'https://seal.carchalabs.com';
13
13
  exports.DEVICE_NAME = 'Carcha Seal quickstart';
14
14
  const COMMAND = 'npx @carchalabs/seal-quickstart';
15
+ /** Sent as the app version, so the console shows which quickstart each device ran. */
16
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
+ exports.QUICKSTART_VERSION = require('../package.json').version;
15
18
  const USAGE = [
16
19
  `Usage: ${COMMAND} <command>`,
17
20
  '',
@@ -62,7 +65,7 @@ async function run(args, options) {
62
65
  product: exports.PRODUCT,
63
66
  publicKey: options.publicKeys ?? bundledPublicKeys(),
64
67
  storageDir: options.storageDir ?? defaultStorageDir((0, node_os_1.platform)(), process.env, (0, node_os_1.homedir)()),
65
- appVersion: '0.4.0',
68
+ appVersion: exports.QUICKSTART_VERSION,
66
69
  fetchImpl: options.fetchImpl,
67
70
  machineId: options.machineId,
68
71
  hardware: options.hardware,
@@ -101,4 +104,3 @@ async function run(args, options) {
101
104
  out(`Checked: ${state.offline ? 'offline, from the signed lease saved on this computer' : 'online'}`);
102
105
  return state.status === 'valid' || state.status === 'grace' ? 0 : 1;
103
106
  }
104
- //# sourceMappingURL=cli.js.map
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@carchalabs/seal-quickstart",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Try Carcha Seal (formerly LicenseKit) from a terminal: activate a trial key, then check the license offline",
5
5
  "keywords": ["licensing", "license-key", "electron", "quickstart", "carcha-seal"],
6
6
  "homepage": "https://seal.carchalabs.com/docs/",
7
7
  "repository": { "type": "git", "url": "git+https://github.com/carcha-labs/carcha-seal-sdk.git", "directory": "packages/quickstart" },
8
- "bugs": { "url": "https://github.com/carcha-labs/carcha-seal-sdk/issues" },
8
+ "bugs": { "email": "bugra@carchalabs.com" },
9
9
  "main": "dist/cli.js",
10
10
  "types": "dist/cli.d.ts",
11
11
  "bin": { "seal-quickstart": "dist/bin.js", "licensekit-quickstart": "dist/bin.js" },
12
- "files": ["dist", "src", "public-keys"],
12
+ "files": ["dist", "!dist/**/*.map", "public-keys"],
13
13
  "scripts": {
14
14
  "build": "tsc -p tsconfig.json",
15
15
  "prepublishOnly": "npm run build"
16
16
  },
17
17
  "dependencies": {
18
- "@carchalabs/seal-electron": "0.5.0"
18
+ "@carchalabs/seal-electron": "0.6.1"
19
19
  },
20
20
  "engines": { "node": ">=22.13" },
21
21
  "publishConfig": { "access": "public" },
22
- "license": "MIT"
22
+ "license": "SEE LICENSE IN LICENSE"
23
23
  }
package/dist/bin.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAE5B,IAAA,SAAG,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CACnE,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;AAC1B,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;IACR,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CACF,CAAC"}
package/dist/cli.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAgCA,8CAEC;AAED,8CAIC;AAeD,kBAoDC;AA3GD,qCAAuC;AACvC,qCAA4C;AAC5C,yCAAiC;AACjC,6DAA0F;AAE7E,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAC5B,QAAA,kBAAkB,GAAG,6BAA6B,CAAC;AACnD,QAAA,WAAW,GAAG,wBAAwB,CAAC;AACpD,MAAM,OAAO,GAAG,iCAAiC,CAAC;A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MAAM,GAAG,CAAC,UAAU,EAAE,CAAC;YACvB,GAAG,CAAC,mCAAmC,CAAC,CAAC;YACzC,OAAO,CAAC,CAAC;QACX,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,GAAG,CAAC,wBAAwB,CAAC,YAAY,4BAAY,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACjF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IAChC,IAAI,KAAK,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;QAClC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAC1B,GAAG,CAAC,QAAQ,OAAO,iCAAiC,CAAC,CAAC;QACtD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACnB,GAAG,CAAC,YAAY,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,uDAAuD,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACtG,OAAO,KAAK,CAAC,MAAM,KAAK,OAAO,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC"}
package/src/bin.ts DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import { run } from './cli';
3
-
4
- run(process.argv.slice(2), { out: (line) => console.log(line) }).then(
5
- (code) => {
6
- process.exitCode = code;
7
- },
8
- (error) => {
9
- console.error(error instanceof Error ? error.message : String(error));
10
- process.exitCode = 1;
11
- },
12
- );
package/src/cli.ts DELETED
@@ -1,108 +0,0 @@
1
- import { readFileSync } from 'node:fs';
2
- import { homedir, platform } from 'node:os';
3
- import { join } from 'node:path';
4
- import { LicenseError, Seal, SealOptions, LicenseState } from '@carchalabs/seal-electron';
5
-
6
- export const PRODUCT = 'licensekit-demo';
7
- export const DEFAULT_SERVER_URL = 'https://seal.carchalabs.com';
8
- export const DEVICE_NAME = 'Carcha Seal quickstart';
9
- const COMMAND = 'npx @carchalabs/seal-quickstart';
10
-
11
- export interface RunOptions {
12
- out: (line: string) => void;
13
- storageDir?: string;
14
- serverUrl?: string;
15
- publicKeys?: string[];
16
- fetchImpl?: typeof fetch;
17
- machineId?: () => Promise<string>;
18
- /** Passed to the SDK (tests simulate machines; the CLI itself reads the hardware). */
19
- hardware?: SealOptions['hardware'];
20
- }
21
-
22
- const USAGE = [
23
- `Usage: ${COMMAND} <command>`,
24
- '',
25
- 'Commands:',
26
- ' activate <license-key> Activate this computer and save a signed lease',
27
- ' status Check the license. Works offline from the saved lease',
28
- " deactivate Release this computer's seat",
29
- '',
30
- 'Get a trial key at https://seal.carchalabs.com/#try',
31
- ];
32
-
33
- export function bundledPublicKeys(): string[] {
34
- return ['current.pem', 'next.pem'].map((file) => readFileSync(join(__dirname, '..', 'public-keys', file), 'utf8'));
35
- }
36
-
37
- export function defaultStorageDir(os: string, env: Record<string, string | undefined>, home: string): string {
38
- if (os === 'darwin') return join(home, 'Library', 'Application Support', 'licensekit-quickstart');
39
- if (os === 'win32') return join(env.APPDATA ?? join(home, 'AppData', 'Roaming'), 'licensekit-quickstart');
40
- return join(env.XDG_CONFIG_HOME || join(home, '.config'), 'licensekit-quickstart');
41
- }
42
-
43
- const minute = (iso: string) => `${iso.slice(0, 10)} ${iso.slice(11, 16)} UTC`;
44
-
45
- function report(state: LicenseState, out: (line: string) => void) {
46
- out(`Status: ${state.status}`);
47
- if (state.message) out(state.message);
48
- if (state.customer) out(`Licensed to: ${state.customer}`);
49
- if (state.status === 'valid' || state.status === 'grace') {
50
- out(`Features: ${state.features.length ? state.features.join(', ') : 'none'}`);
51
- out(`Expires: ${state.expiresAt ? minute(state.expiresAt) : 'never'}`);
52
- if (state.revalidateBy) out(`${state.status === 'valid' ? 'Check in by' : 'Works offline until'}: ${minute(state.revalidateBy)}`);
53
- }
54
- }
55
-
56
- export async function run(args: string[], options: RunOptions): Promise<number> {
57
- const { out } = options;
58
- const [command, key] = args;
59
- if (command === 'help' || command === '--help' || command === '-h') {
60
- USAGE.forEach((line) => out(line));
61
- return 0;
62
- }
63
- if (!['activate', 'status', 'deactivate'].includes(command ?? '') || (command === 'activate' && !key)) {
64
- USAGE.forEach((line) => out(line));
65
- return 2;
66
- }
67
- const kit = new Seal({
68
- serverUrl: options.serverUrl ?? DEFAULT_SERVER_URL,
69
- product: PRODUCT,
70
- publicKey: options.publicKeys ?? bundledPublicKeys(),
71
- storageDir: options.storageDir ?? defaultStorageDir(platform(), process.env, homedir()),
72
- appVersion: '0.4.0',
73
- fetchImpl: options.fetchImpl,
74
- machineId: options.machineId,
75
- hardware: options.hardware,
76
- });
77
- if (command === 'activate') {
78
- try {
79
- const state = await kit.activate(key, DEVICE_NAME);
80
- report(state, out);
81
- out('Saved lease: not encrypted. A terminal has no system keychain; an Electron app uses safeStorage.');
82
- out(`Turn off the network and run "${COMMAND} status" to check it offline.`);
83
- return 0;
84
- } catch (e) {
85
- out(`Activation failed: ${e instanceof LicenseError ? e.message : String(e)}`);
86
- return 1;
87
- }
88
- }
89
- if (command === 'deactivate') {
90
- try {
91
- await kit.deactivate();
92
- out("This computer's seat is released.");
93
- return 0;
94
- } catch (e) {
95
- out(`Deactivation failed: ${e instanceof LicenseError ? e.message : String(e)}`);
96
- return 1;
97
- }
98
- }
99
- const state = await kit.check();
100
- if (state.status === 'unlicensed') {
101
- out('Status: unlicensed');
102
- out(`Run "${COMMAND} activate <license-key>" first.`);
103
- return 1;
104
- }
105
- report(state, out);
106
- out(`Checked: ${state.offline ? 'offline, from the signed lease saved on this computer' : 'online'}`);
107
- return state.status === 'valid' || state.status === 'grace' ? 0 : 1;
108
- }