@fairmint/open-captable-protocol-daml-js 0.2.152 → 0.2.157
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/lib/index.d.ts
CHANGED
|
@@ -3,12 +3,11 @@ import * as Nft from './Nft';
|
|
|
3
3
|
import * as CantonPayments from './CantonPayments';
|
|
4
4
|
import * as Splice from './Splice';
|
|
5
5
|
import * as DA from './DA';
|
|
6
|
-
import * as Fairmint_OpenCapTable_CapTable from './Fairmint/OpenCapTable/CapTable/module';
|
|
7
|
-
import * as Fairmint_OpenCapTable_IssuerAuthorization from './Fairmint/OpenCapTable/IssuerAuthorization/module';
|
|
8
|
-
import * as Fairmint_OpenCapTable_OcpFactory from './Fairmint/OpenCapTable/OcpFactory/module';
|
|
9
6
|
export { Fairmint, Nft, CantonPayments, DA, Splice } ;
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
export {
|
|
8
|
+
getOpenCapTableDarPath,
|
|
9
|
+
resolveOpenCapTableDarPath,
|
|
10
|
+
OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH,
|
|
11
|
+
OPEN_CAP_TABLE_DAR_PATH_ENV,
|
|
12
|
+
} from './openCapTableDarPath';
|
|
13
|
+
export type { ResolveOpenCapTableDarPathOptions } from './openCapTableDarPath';
|
package/lib/index.js
CHANGED
|
@@ -15,11 +15,8 @@ var DA = require('./DA');
|
|
|
15
15
|
exports.DA = DA;
|
|
16
16
|
var Splice = require('./Splice');
|
|
17
17
|
exports.Splice = Splice;
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
exports.
|
|
22
|
-
|
|
23
|
-
issuerAuthorization: Fairmint_OpenCapTable_IssuerAuthorization.IssuerAuthorization.templateId,
|
|
24
|
-
ocpFactory: Fairmint_OpenCapTable_OcpFactory.OcpFactory.templateId,
|
|
25
|
-
});
|
|
18
|
+
var _openCapTableDarPath = require('./openCapTableDarPath');
|
|
19
|
+
exports.getOpenCapTableDarPath = _openCapTableDarPath.getOpenCapTableDarPath;
|
|
20
|
+
exports.resolveOpenCapTableDarPath = _openCapTableDarPath.resolveOpenCapTableDarPath;
|
|
21
|
+
exports.OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH = _openCapTableDarPath.OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH;
|
|
22
|
+
exports.OPEN_CAP_TABLE_DAR_PATH_ENV = _openCapTableDarPath.OPEN_CAP_TABLE_DAR_PATH_ENV;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCapTable DAR path helpers. Published as `@fairmint/open-captable-protocol-daml-js/openCapTableDarPath` (and
|
|
3
|
+
* re-exported from the package root).
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* User-facing documentation for `OPEN_CAP_TABLE_DAR_PATH`, monorepo layout, and options lives in this repository’s
|
|
7
|
+
* **GitHub Wiki** — not in markdown files inside the repo.
|
|
8
|
+
*/
|
|
9
|
+
/** Env var: absolute or cwd-relative path to a `.dar` file; checked first when set. */
|
|
10
|
+
export declare const OPEN_CAP_TABLE_DAR_PATH_ENV: "OPEN_CAP_TABLE_DAR_PATH";
|
|
11
|
+
/**
|
|
12
|
+
* Npm `exports` subpath for the raw DAR file (for tools that need `require.resolve` / bundler parity).
|
|
13
|
+
*
|
|
14
|
+
* @see package.json `exports["./opencaptable.dar"]`
|
|
15
|
+
*/
|
|
16
|
+
export declare const OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH: "./opencaptable.dar";
|
|
17
|
+
export interface ResolveOpenCapTableDarPathOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Root of the consuming repository (e.g. SDK or app checkout). The parent directory should contain
|
|
20
|
+
* `open-captable-protocol-daml` when using the default sibling layout.
|
|
21
|
+
*/
|
|
22
|
+
siblingSearchFrom?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Custom DAR path: absolute, or relative to `siblingSearchFrom` (required when relative). Use when the daml checkout
|
|
25
|
+
* is not at the default sibling path.
|
|
26
|
+
*/
|
|
27
|
+
siblingDarPath?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Absolute path to the OpenCapTable DAR inside this npm package (`published-dars/OpenCapTable.dar`).
|
|
31
|
+
*
|
|
32
|
+
* @throws If the file is missing (corrupt install, or git checkout without `npm run codegen` / staging).
|
|
33
|
+
*/
|
|
34
|
+
export declare function getOpenCapTableDarPath(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve the OpenCapTable DAR for local tooling and tests. Resolution order:
|
|
37
|
+
*
|
|
38
|
+
* 1. **`OPEN_CAP_TABLE_DAR_PATH`** (if set and the file exists).
|
|
39
|
+
* 2. Packaged DAR via {@link getOpenCapTableDarPath}.
|
|
40
|
+
* 3. **`siblingDarPath`** when it resolves to an existing file (absolute, or relative to `siblingSearchFrom`).
|
|
41
|
+
* 4. Default sibling checkout: `{siblingSearchFrom}/../open-captable-protocol-daml/published-dars/OpenCapTable.dar`.
|
|
42
|
+
*
|
|
43
|
+
* On failure after step 2, the thrown error sets **`cause`** to the packaged-DAR error when it was an `Error`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolveOpenCapTableDarPath(options?: ResolveOpenCapTableDarPathOptions): string;
|
|
46
|
+
//# sourceMappingURL=openCapTableDarPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openCapTableDarPath.d.ts","sourceRoot":"","sources":["../scripts/npm-published-lib/openCapTableDarPath.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,uFAAuF;AACvF,eAAO,MAAM,2BAA2B,EAAG,yBAAkC,CAAC;AAE9E;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAAG,oBAA6B,CAAC;AAa/E,MAAM,WAAW,iCAAiC;IAChD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAqCD;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAS/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,CAAC,EAAE,iCAAiC,GAAG,MAAM,CAmD9F"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* OpenCapTable DAR path helpers. Published as `@fairmint/open-captable-protocol-daml-js/openCapTableDarPath` (and
|
|
4
|
+
* re-exported from the package root).
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* User-facing documentation for `OPEN_CAP_TABLE_DAR_PATH`, monorepo layout, and options lives in this repository’s
|
|
8
|
+
* **GitHub Wiki** — not in markdown files inside the repo.
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
27
|
+
var ownKeys = function(o) {
|
|
28
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
29
|
+
var ar = [];
|
|
30
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
return ownKeys(o);
|
|
34
|
+
};
|
|
35
|
+
return function (mod) {
|
|
36
|
+
if (mod && mod.__esModule) return mod;
|
|
37
|
+
var result = {};
|
|
38
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
39
|
+
__setModuleDefault(result, mod);
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH = exports.OPEN_CAP_TABLE_DAR_PATH_ENV = void 0;
|
|
45
|
+
exports.getOpenCapTableDarPath = getOpenCapTableDarPath;
|
|
46
|
+
exports.resolveOpenCapTableDarPath = resolveOpenCapTableDarPath;
|
|
47
|
+
const fs = __importStar(require("fs"));
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
/** Env var: absolute or cwd-relative path to a `.dar` file; checked first when set. */
|
|
50
|
+
exports.OPEN_CAP_TABLE_DAR_PATH_ENV = 'OPEN_CAP_TABLE_DAR_PATH';
|
|
51
|
+
/**
|
|
52
|
+
* Npm `exports` subpath for the raw DAR file (for tools that need `require.resolve` / bundler parity).
|
|
53
|
+
*
|
|
54
|
+
* @see package.json `exports["./opencaptable.dar"]`
|
|
55
|
+
*/
|
|
56
|
+
exports.OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH = './opencaptable.dar';
|
|
57
|
+
/**
|
|
58
|
+
* From a dependent repo root: sibling `open-captable-protocol-daml` staged DAR
|
|
59
|
+
* (`../open-captable-protocol-daml/published-dars/OpenCapTable.dar`).
|
|
60
|
+
*/
|
|
61
|
+
const DEFAULT_SIBLING_DAR_SEGMENTS = [
|
|
62
|
+
'..',
|
|
63
|
+
'open-captable-protocol-daml',
|
|
64
|
+
'published-dars',
|
|
65
|
+
'OpenCapTable.dar',
|
|
66
|
+
];
|
|
67
|
+
function readEnvDarPath() {
|
|
68
|
+
const raw = process.env[exports.OPEN_CAP_TABLE_DAR_PATH_ENV]?.trim();
|
|
69
|
+
if (!raw) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const resolved = path.isAbsolute(raw) ? raw : path.resolve(process.cwd(), raw);
|
|
73
|
+
if (!fs.existsSync(resolved)) {
|
|
74
|
+
throw new Error(`${exports.OPEN_CAP_TABLE_DAR_PATH_ENV} points to a missing file: ${resolved} (raw: ${JSON.stringify(raw)})`);
|
|
75
|
+
}
|
|
76
|
+
return resolved;
|
|
77
|
+
}
|
|
78
|
+
function resolveCustomSiblingDar(options) {
|
|
79
|
+
const custom = options.siblingDarPath?.trim();
|
|
80
|
+
if (!custom) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
if (path.isAbsolute(custom)) {
|
|
84
|
+
return fs.existsSync(custom) ? custom : null;
|
|
85
|
+
}
|
|
86
|
+
const from = options.siblingSearchFrom?.trim();
|
|
87
|
+
if (!from) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const joined = path.resolve(from, custom);
|
|
91
|
+
return fs.existsSync(joined) ? joined : null;
|
|
92
|
+
}
|
|
93
|
+
function defaultSiblingDar(siblingSearchFrom) {
|
|
94
|
+
const dar = path.join(siblingSearchFrom, ...DEFAULT_SIBLING_DAR_SEGMENTS);
|
|
95
|
+
return fs.existsSync(dar) ? dar : null;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Absolute path to the OpenCapTable DAR inside this npm package (`published-dars/OpenCapTable.dar`).
|
|
99
|
+
*
|
|
100
|
+
* @throws If the file is missing (corrupt install, or git checkout without `npm run codegen` / staging).
|
|
101
|
+
*/
|
|
102
|
+
function getOpenCapTableDarPath() {
|
|
103
|
+
const darPath = path.join(__dirname, '..', 'published-dars', 'OpenCapTable.dar');
|
|
104
|
+
if (!fs.existsSync(darPath)) {
|
|
105
|
+
throw new Error(`OpenCapTable DAR not found at ${darPath}. ` +
|
|
106
|
+
'Expected published-dars/OpenCapTable.dar (run npm run codegen before pack, or use a published tarball).');
|
|
107
|
+
}
|
|
108
|
+
return darPath;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Resolve the OpenCapTable DAR for local tooling and tests. Resolution order:
|
|
112
|
+
*
|
|
113
|
+
* 1. **`OPEN_CAP_TABLE_DAR_PATH`** (if set and the file exists).
|
|
114
|
+
* 2. Packaged DAR via {@link getOpenCapTableDarPath}.
|
|
115
|
+
* 3. **`siblingDarPath`** when it resolves to an existing file (absolute, or relative to `siblingSearchFrom`).
|
|
116
|
+
* 4. Default sibling checkout: `{siblingSearchFrom}/../open-captable-protocol-daml/published-dars/OpenCapTable.dar`.
|
|
117
|
+
*
|
|
118
|
+
* On failure after step 2, the thrown error sets **`cause`** to the packaged-DAR error when it was an `Error`.
|
|
119
|
+
*/
|
|
120
|
+
function resolveOpenCapTableDarPath(options) {
|
|
121
|
+
const opts = options ?? {};
|
|
122
|
+
const customRaw = opts.siblingDarPath?.trim();
|
|
123
|
+
if (customRaw && !path.isAbsolute(customRaw) && !opts.siblingSearchFrom?.trim()) {
|
|
124
|
+
throw new Error('resolveOpenCapTableDarPath: siblingDarPath is relative; set siblingSearchFrom to the dependent repository root.');
|
|
125
|
+
}
|
|
126
|
+
const envPath = readEnvDarPath();
|
|
127
|
+
if (envPath) {
|
|
128
|
+
return envPath;
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
return getOpenCapTableDarPath();
|
|
132
|
+
}
|
|
133
|
+
catch (packagedCause) {
|
|
134
|
+
const custom = resolveCustomSiblingDar(opts);
|
|
135
|
+
if (custom) {
|
|
136
|
+
return custom;
|
|
137
|
+
}
|
|
138
|
+
const from = opts.siblingSearchFrom?.trim();
|
|
139
|
+
if (from) {
|
|
140
|
+
const siblingDar = defaultSiblingDar(from);
|
|
141
|
+
if (siblingDar) {
|
|
142
|
+
return siblingDar;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const base = packagedCause instanceof Error ? packagedCause.message : String(packagedCause);
|
|
146
|
+
const hints = [];
|
|
147
|
+
if (opts.siblingDarPath?.trim()) {
|
|
148
|
+
hints.push('siblingDarPath did not resolve to an existing file.');
|
|
149
|
+
}
|
|
150
|
+
if (from) {
|
|
151
|
+
hints.push('No DAR at ../open-captable-protocol-daml/published-dars/OpenCapTable.dar.');
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
hints.push('Tip: set OPEN_CAP_TABLE_DAR_PATH, or pass siblingSearchFrom / siblingDarPath for monorepo dev (see GitHub Wiki).');
|
|
155
|
+
}
|
|
156
|
+
const msg = [base, hints.length ? ` ${hints.join(' ')}` : ''].join('');
|
|
157
|
+
if (packagedCause instanceof Error) {
|
|
158
|
+
const err = new Error(msg);
|
|
159
|
+
err.cause = packagedCause;
|
|
160
|
+
throw err;
|
|
161
|
+
}
|
|
162
|
+
throw new Error(msg);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=openCapTableDarPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openCapTableDarPath.js","sourceRoot":"","sources":["../scripts/npm-published-lib/openCapTableDarPath.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EH,wDASC;AAYD,gEAmDC;AArJD,uCAAyB;AACzB,2CAA6B;AAE7B,uFAAuF;AAC1E,QAAA,2BAA2B,GAAG,yBAAkC,CAAC;AAE9E;;;;GAIG;AACU,QAAA,iCAAiC,GAAG,oBAA6B,CAAC;AAE/E;;;GAGG;AACH,MAAM,4BAA4B,GAAG;IACnC,IAAI;IACJ,6BAA6B;IAC7B,gBAAgB;IAChB,kBAAkB;CACV,CAAC;AAeX,SAAS,cAAc;IACrB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAA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"0.2.
|
|
3
|
+
"version": "0.2.157",
|
|
4
4
|
"description": "Open CapTable Protocol DAML smart contracts with generated JavaScript bindings.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"daml",
|
|
@@ -37,7 +37,11 @@
|
|
|
37
37
|
"types": "./types/paymentStreams-factory-contract-id-json.d.ts",
|
|
38
38
|
"default": "./generated/paymentStreams-factory-contract-id.json"
|
|
39
39
|
},
|
|
40
|
-
"./opencaptable.dar": "./published-dars/OpenCapTable.dar"
|
|
40
|
+
"./opencaptable.dar": "./published-dars/OpenCapTable.dar",
|
|
41
|
+
"./openCapTableDarPath": {
|
|
42
|
+
"types": "./lib/openCapTableDarPath.d.ts",
|
|
43
|
+
"default": "./lib/openCapTableDarPath.js"
|
|
44
|
+
}
|
|
41
45
|
},
|
|
42
46
|
"main": "lib/index.js",
|
|
43
47
|
"types": "lib/index.d.ts",
|
|
@@ -51,6 +55,9 @@
|
|
|
51
55
|
],
|
|
52
56
|
"paymentStreams-factory-contract-id.json": [
|
|
53
57
|
"types/paymentStreams-factory-contract-id-json.d.ts"
|
|
58
|
+
],
|
|
59
|
+
"openCapTableDarPath": [
|
|
60
|
+
"./lib/openCapTableDarPath.d.ts"
|
|
54
61
|
]
|
|
55
62
|
}
|
|
56
63
|
},
|
|
@@ -67,12 +74,13 @@
|
|
|
67
74
|
"scripts": {
|
|
68
75
|
"backup-dar": "tsx scripts/backup-dar.ts",
|
|
69
76
|
"build": "npm run check:nft-core-invariants && tsx scripts/codegen/generate-captable.ts && cd Test && PATH=\"$HOME/.dpm/bin:$PATH\" dpm build",
|
|
77
|
+
"build:npm-runtime-lib": "tsc -p tsconfig.npm-runtime.json",
|
|
70
78
|
"build:ts": "tsc",
|
|
71
79
|
"check:nft-core-invariants": "tsx scripts/check-nft-core-invariants.ts",
|
|
72
80
|
"check:schema-gaps": "tsx scripts/schema-gap-checker/check-schema-gaps.ts",
|
|
73
81
|
"check-upgrade-compat": "tsx scripts/check-upgrade-compatibility.ts",
|
|
74
82
|
"clean": "for pkg in Shared OpenCapTableReports-v01 OpenCapTable-v34 NftApi-v01 NftReference-v01 EquityCertificateShared EquityCertificate-v01 OpenCapTableProofOfOwnership-v01 CantonPayments CouponMinter Test; do (cd $pkg && PATH=\"$HOME/.dpm/bin:$PATH\" dpm clean); done",
|
|
75
|
-
"codegen": "npm run build && cd OpenCapTable-v34 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd Shared && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd OpenCapTableReports-v01 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd NftApi-v01 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd NftReference-v01 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && tsx scripts/merge-nft-iface-codegen.ts && cd CantonPayments && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.ts && tsx scripts/create-root-index.ts && tsx scripts/fix-splice-refs.ts && npm run build:ts && tsx scripts/stage-npm-opencaptable-dar.ts",
|
|
83
|
+
"codegen": "npm run build && cd OpenCapTable-v34 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd Shared && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd OpenCapTableReports-v01 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd NftApi-v01 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && cd NftReference-v01 && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && tsx scripts/merge-nft-iface-codegen.ts && cd CantonPayments && PATH=\"$HOME/.dpm/bin:$PATH\" dpm codegen-js && cd .. && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.ts && tsx scripts/create-root-index.ts && tsx scripts/fix-splice-refs.ts && npm run build:ts && tsx scripts/stage-npm-opencaptable-dar.ts && npm run build:npm-runtime-lib",
|
|
76
84
|
"create-couponMinter": "tsx scripts/create-couponMinter.ts",
|
|
77
85
|
"create-factory:ocp": "npm run codegen && tsx scripts/create-ocp-factory.ts --network devnet && tsx scripts/create-ocp-factory.ts --network mainnet",
|
|
78
86
|
"create-factory:paymentStreams": "npm run codegen && tsx scripts/create-paymentStreams-factory.ts --network devnet && tsx scripts/create-paymentStreams-factory.ts --network mainnet",
|
|
@@ -84,7 +92,7 @@
|
|
|
84
92
|
"lint:daml": "EXIT_CODE=0; for pkg in OpenCapTable-v34 CantonPayments OpenCapTableReports-v01 NftApi-v01 NftReference-v01 EquityCertificateShared EquityCertificate-v01 OpenCapTableProofOfOwnership-v01 Shared CouponMinter Test; do echo \"Linting $pkg...\"; (cd $pkg && PATH=\"$HOME/.dpm/bin:$PATH\" dpm damlc lint) || EXIT_CODE=1; done; exit $EXIT_CODE",
|
|
85
93
|
"lint:fix": "eslint . --fix",
|
|
86
94
|
"package:manifest": "npm run package:prep && npm pack --dry-run --json --ignore-scripts > /tmp/npm-pack.json 2>/dev/null && jq -r '.[0].files[].path' /tmp/npm-pack.json | sort | tsx scripts/collapse-manifest.ts > generated/npm-manifest.txt",
|
|
87
|
-
"package:prep": "npm run codegen && npm run update-version && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.ts && tsx scripts/create-root-index.ts && tsx scripts/fix-splice-refs.ts",
|
|
95
|
+
"package:prep": "npm run codegen && npm run update-version && tsx scripts/bundle-dependencies.ts && tsx scripts/create-package-index.ts && tsx scripts/create-root-index.ts && tsx scripts/fix-splice-refs.ts && npm run build:npm-runtime-lib",
|
|
88
96
|
"package:publish": "npm run package:manifest && npm publish",
|
|
89
97
|
"prepare-release": "tsx scripts/prepare-release.ts",
|
|
90
98
|
"test": "npm run check:nft-core-invariants && cd Test && PATH=\"$HOME/.dpm/bin:$PATH\" dpm test --show-coverage --color --coverage-ignore-choice splice-amulet:.*",
|