@fairmint/open-captable-protocol-daml-js 0.2.151 → 0.2.154

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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Absolute path to the OpenCapTable DAR shipped in this package (`published-dars/OpenCapTable.dar`).
3
+ *
4
+ * Published as `@fairmint/open-captable-protocol-daml-js/openCapTableDarPath` so tools and tests do not duplicate
5
+ * `createRequire` / subpath strings.
6
+ */
7
+ /**
8
+ * Npm `exports` subpath for the raw DAR file (for tools that need `require.resolve` / bundler parity).
9
+ *
10
+ * @see package.json `exports["./opencaptable.dar"]`
11
+ */
12
+ export declare const OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH: "./opencaptable.dar";
13
+ /**
14
+ * Return the absolute path to the staged OpenCapTable DAR on disk.
15
+ *
16
+ * @throws If the file is missing (corrupt install or pre-staging checkout without `npm run codegen`).
17
+ */
18
+ export declare function getOpenCapTableDarPath(): string;
19
+ //# 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;;;;;GAKG;AAKH;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAAG,oBAA6B,CAAC;AAE/E;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAS/C"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * Absolute path to the OpenCapTable DAR shipped in this package (`published-dars/OpenCapTable.dar`).
4
+ *
5
+ * Published as `@fairmint/open-captable-protocol-daml-js/openCapTableDarPath` so tools and tests do not duplicate
6
+ * `createRequire` / subpath strings.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH = void 0;
43
+ exports.getOpenCapTableDarPath = getOpenCapTableDarPath;
44
+ const fs = __importStar(require("fs"));
45
+ const path = __importStar(require("path"));
46
+ /**
47
+ * Npm `exports` subpath for the raw DAR file (for tools that need `require.resolve` / bundler parity).
48
+ *
49
+ * @see package.json `exports["./opencaptable.dar"]`
50
+ */
51
+ exports.OPEN_CAP_TABLE_DAR_EXPORT_SUBPATH = './opencaptable.dar';
52
+ /**
53
+ * Return the absolute path to the staged OpenCapTable DAR on disk.
54
+ *
55
+ * @throws If the file is missing (corrupt install or pre-staging checkout without `npm run codegen`).
56
+ */
57
+ function getOpenCapTableDarPath() {
58
+ const darPath = path.join(__dirname, '..', 'published-dars', 'OpenCapTable.dar');
59
+ if (!fs.existsSync(darPath)) {
60
+ throw new Error(`OpenCapTable DAR not found at ${darPath}. ` +
61
+ 'Expected published-dars/OpenCapTable.dar (run npm run codegen before pack, or use a published tarball).');
62
+ }
63
+ return darPath;
64
+ }
65
+ //# sourceMappingURL=openCapTableDarPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openCapTableDarPath.js","sourceRoot":"","sources":["../scripts/npm-published-lib/openCapTableDarPath.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBH,wDASC;AAxBD,uCAAyB;AACzB,2CAA6B;AAE7B;;;;GAIG;AACU,QAAA,iCAAiC,GAAG,oBAA6B,CAAC;AAE/E;;;;GAIG;AACH,SAAgB,sBAAsB;IACpC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IACjF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,iCAAiC,OAAO,IAAI;YAC1C,yGAAyG,CAC5G,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairmint/open-captable-protocol-daml-js",
3
- "version": "0.2.151",
3
+ "version": "0.2.154",
4
4
  "description": "Open CapTable Protocol DAML smart contracts with generated JavaScript bindings.",
5
5
  "keywords": [
6
6
  "daml",
@@ -36,6 +36,11 @@
36
36
  "./paymentStreams-factory-contract-id.json": {
37
37
  "types": "./types/paymentStreams-factory-contract-id-json.d.ts",
38
38
  "default": "./generated/paymentStreams-factory-contract-id.json"
39
+ },
40
+ "./opencaptable.dar": "./published-dars/OpenCapTable.dar",
41
+ "./openCapTableDarPath": {
42
+ "types": "./lib/openCapTableDarPath.d.ts",
43
+ "default": "./lib/openCapTableDarPath.js"
39
44
  }
40
45
  },
41
46
  "main": "lib/index.js",
@@ -50,6 +55,9 @@
50
55
  ],
51
56
  "paymentStreams-factory-contract-id.json": [
52
57
  "types/paymentStreams-factory-contract-id-json.d.ts"
58
+ ],
59
+ "openCapTableDarPath": [
60
+ "./lib/openCapTableDarPath.d.ts"
53
61
  ]
54
62
  }
55
63
  },
@@ -61,17 +69,18 @@
61
69
  "types/reports-factory-contract-id-json.d.ts",
62
70
  "generated/paymentStreams-factory-contract-id.json",
63
71
  "types/paymentStreams-factory-contract-id-json.d.ts",
64
- "OpenCapTable-v34/.daml/dist/OpenCapTable-v34-0.0.1.dar"
72
+ "published-dars/OpenCapTable.dar"
65
73
  ],
66
74
  "scripts": {
67
75
  "backup-dar": "tsx scripts/backup-dar.ts",
68
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",
69
78
  "build:ts": "tsc",
70
79
  "check:nft-core-invariants": "tsx scripts/check-nft-core-invariants.ts",
71
80
  "check:schema-gaps": "tsx scripts/schema-gap-checker/check-schema-gaps.ts",
72
81
  "check-upgrade-compat": "tsx scripts/check-upgrade-compatibility.ts",
73
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",
74
- "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",
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",
75
84
  "create-couponMinter": "tsx scripts/create-couponMinter.ts",
76
85
  "create-factory:ocp": "npm run codegen && tsx scripts/create-ocp-factory.ts --network devnet && tsx scripts/create-ocp-factory.ts --network mainnet",
77
86
  "create-factory:paymentStreams": "npm run codegen && tsx scripts/create-paymentStreams-factory.ts --network devnet && tsx scripts/create-paymentStreams-factory.ts --network mainnet",
@@ -83,7 +92,7 @@
83
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",
84
93
  "lint:fix": "eslint . --fix",
85
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",
86
- "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",
87
96
  "package:publish": "npm run package:manifest && npm publish",
88
97
  "prepare-release": "tsx scripts/prepare-release.ts",
89
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:.*",