@x12i/catalox 2.7.0 → 3.1.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.
Files changed (137) hide show
  1. package/README.md +73 -31
  2. package/dist/src/catalox/authorization.js +1 -1
  3. package/dist/src/catalox/authorization.js.map +1 -1
  4. package/dist/src/catalox/catalog-lifecycle.d.ts +29 -0
  5. package/dist/src/catalox/catalog-lifecycle.d.ts.map +1 -0
  6. package/dist/src/catalox/catalog-lifecycle.js +480 -0
  7. package/dist/src/catalox/catalog-lifecycle.js.map +1 -0
  8. package/dist/src/catalox/catalox-bound.d.ts +135 -0
  9. package/dist/src/catalox/catalox-bound.d.ts.map +1 -0
  10. package/dist/src/catalox/catalox-bound.js +190 -0
  11. package/dist/src/catalox/catalox-bound.js.map +1 -0
  12. package/dist/src/catalox/catalox.d.ts +34 -4
  13. package/dist/src/catalox/catalox.d.ts.map +1 -1
  14. package/dist/src/catalox/catalox.js +508 -72
  15. package/dist/src/catalox/catalox.js.map +1 -1
  16. package/dist/src/catalox/context.js +2 -2
  17. package/dist/src/catalox/context.js.map +1 -1
  18. package/dist/src/catalox/create-catalox.d.ts +28 -0
  19. package/dist/src/catalox/create-catalox.d.ts.map +1 -0
  20. package/dist/src/catalox/create-catalox.js +90 -0
  21. package/dist/src/catalox/create-catalox.js.map +1 -0
  22. package/dist/src/catalox/index.d.ts +4 -0
  23. package/dist/src/catalox/index.d.ts.map +1 -1
  24. package/dist/src/catalox/index.js +4 -0
  25. package/dist/src/catalox/index.js.map +1 -1
  26. package/dist/src/catalox/native-catalog-merge.d.ts +12 -0
  27. package/dist/src/catalox/native-catalog-merge.d.ts.map +1 -0
  28. package/dist/src/catalox/native-catalog-merge.js +102 -0
  29. package/dist/src/catalox/native-catalog-merge.js.map +1 -0
  30. package/dist/src/catalox/native-scope.d.ts +28 -0
  31. package/dist/src/catalox/native-scope.d.ts.map +1 -0
  32. package/dist/src/catalox/native-scope.js +184 -0
  33. package/dist/src/catalox/native-scope.js.map +1 -0
  34. package/dist/src/catalox/record-history.d.ts +53 -0
  35. package/dist/src/catalox/record-history.d.ts.map +1 -0
  36. package/dist/src/catalox/record-history.js +158 -0
  37. package/dist/src/catalox/record-history.js.map +1 -0
  38. package/dist/src/cli/index.js +148 -42
  39. package/dist/src/cli/index.js.map +1 -1
  40. package/dist/src/contracts/apps.d.ts +2 -0
  41. package/dist/src/contracts/apps.d.ts.map +1 -1
  42. package/dist/src/contracts/catalog-lifecycle.d.ts +70 -0
  43. package/dist/src/contracts/catalog-lifecycle.d.ts.map +1 -0
  44. package/dist/src/contracts/catalog-lifecycle.js +2 -0
  45. package/dist/src/contracts/catalog-lifecycle.js.map +1 -0
  46. package/dist/src/contracts/catalogs.d.ts +54 -0
  47. package/dist/src/contracts/catalogs.d.ts.map +1 -1
  48. package/dist/src/contracts/catalogs.js.map +1 -1
  49. package/dist/src/contracts/context.d.ts +5 -1
  50. package/dist/src/contracts/context.d.ts.map +1 -1
  51. package/dist/src/contracts/descriptors.d.ts +6 -0
  52. package/dist/src/contracts/descriptors.d.ts.map +1 -1
  53. package/dist/src/contracts/index.d.ts +5 -2
  54. package/dist/src/contracts/index.d.ts.map +1 -1
  55. package/dist/src/contracts/index.js.map +1 -1
  56. package/dist/src/contracts/items.d.ts +19 -0
  57. package/dist/src/contracts/items.d.ts.map +1 -1
  58. package/dist/src/contracts/record-history.d.ts +66 -0
  59. package/dist/src/contracts/record-history.d.ts.map +1 -0
  60. package/dist/src/contracts/record-history.js +2 -0
  61. package/dist/src/contracts/record-history.js.map +1 -0
  62. package/dist/src/embedder.d.ts +17 -0
  63. package/dist/src/embedder.d.ts.map +1 -0
  64. package/dist/src/embedder.js +17 -0
  65. package/dist/src/embedder.js.map +1 -0
  66. package/dist/src/firebase/adapter-store.d.ts +1 -0
  67. package/dist/src/firebase/adapter-store.d.ts.map +1 -1
  68. package/dist/src/firebase/adapter-store.js +3 -0
  69. package/dist/src/firebase/adapter-store.js.map +1 -1
  70. package/dist/src/firebase/binding-store.d.ts +2 -0
  71. package/dist/src/firebase/binding-store.d.ts.map +1 -1
  72. package/dist/src/firebase/binding-store.js +10 -0
  73. package/dist/src/firebase/binding-store.js.map +1 -1
  74. package/dist/src/firebase/catalog-data-index-store.d.ts +1 -0
  75. package/dist/src/firebase/catalog-data-index-store.d.ts.map +1 -1
  76. package/dist/src/firebase/catalog-data-index-store.js +3 -0
  77. package/dist/src/firebase/catalog-data-index-store.js.map +1 -1
  78. package/dist/src/firebase/catalog-item-history-store.d.ts +21 -0
  79. package/dist/src/firebase/catalog-item-history-store.d.ts.map +1 -0
  80. package/dist/src/firebase/catalog-item-history-store.js +61 -0
  81. package/dist/src/firebase/catalog-item-history-store.js.map +1 -0
  82. package/dist/src/firebase/catalog-store.d.ts +1 -0
  83. package/dist/src/firebase/catalog-store.d.ts.map +1 -1
  84. package/dist/src/firebase/catalog-store.js +3 -0
  85. package/dist/src/firebase/catalog-store.js.map +1 -1
  86. package/dist/src/firebase/index.d.ts +1 -0
  87. package/dist/src/firebase/index.d.ts.map +1 -1
  88. package/dist/src/firebase/index.js +1 -0
  89. package/dist/src/firebase/index.js.map +1 -1
  90. package/dist/src/firebase/mapping-store.d.ts +1 -0
  91. package/dist/src/firebase/mapping-store.d.ts.map +1 -1
  92. package/dist/src/firebase/mapping-store.js +3 -0
  93. package/dist/src/firebase/mapping-store.js.map +1 -1
  94. package/dist/src/firebase/native-item-store.d.ts +8 -2
  95. package/dist/src/firebase/native-item-store.d.ts.map +1 -1
  96. package/dist/src/firebase/native-item-store.js +22 -6
  97. package/dist/src/firebase/native-item-store.js.map +1 -1
  98. package/dist/src/firebase/reference-store.d.ts +3 -0
  99. package/dist/src/firebase/reference-store.d.ts.map +1 -1
  100. package/dist/src/firebase/reference-store.js +16 -0
  101. package/dist/src/firebase/reference-store.js.map +1 -1
  102. package/dist/src/firebase/renderer-snippet-store.d.ts +3 -0
  103. package/dist/src/firebase/renderer-snippet-store.d.ts.map +1 -1
  104. package/dist/src/firebase/renderer-snippet-store.js +17 -0
  105. package/dist/src/firebase/renderer-snippet-store.js.map +1 -1
  106. package/dist/src/firebase/snapshot-store.d.ts +1 -0
  107. package/dist/src/firebase/snapshot-store.d.ts.map +1 -1
  108. package/dist/src/firebase/snapshot-store.js +8 -0
  109. package/dist/src/firebase/snapshot-store.js.map +1 -1
  110. package/dist/src/index.d.ts +2 -15
  111. package/dist/src/index.d.ts.map +1 -1
  112. package/dist/src/index.js +2 -15
  113. package/dist/src/index.js.map +1 -1
  114. package/dist/src/operator.d.ts +24 -0
  115. package/dist/src/operator.d.ts.map +1 -0
  116. package/dist/src/operator.js +25 -0
  117. package/dist/src/operator.js.map +1 -0
  118. package/dist/test/integration/firestore.emulator.test.js +16 -29
  119. package/dist/test/integration/firestore.emulator.test.js.map +1 -1
  120. package/dist/test/integration/record-history.live.test.d.ts +2 -0
  121. package/dist/test/integration/record-history.live.test.d.ts.map +1 -0
  122. package/dist/test/integration/record-history.live.test.js +126 -0
  123. package/dist/test/integration/record-history.live.test.js.map +1 -0
  124. package/dist/test/unit/native-catalog-merge.test.d.ts +2 -0
  125. package/dist/test/unit/native-catalog-merge.test.d.ts.map +1 -0
  126. package/dist/test/unit/native-catalog-merge.test.js +33 -0
  127. package/dist/test/unit/native-catalog-merge.test.js.map +1 -0
  128. package/dist/test/unit/native-scope.test.d.ts +2 -0
  129. package/dist/test/unit/native-scope.test.d.ts.map +1 -0
  130. package/dist/test/unit/native-scope.test.js +29 -0
  131. package/dist/test/unit/native-scope.test.js.map +1 -0
  132. package/dist/test/unit/record-history-path.test.d.ts +2 -0
  133. package/dist/test/unit/record-history-path.test.d.ts.map +1 -0
  134. package/dist/test/unit/record-history-path.test.js +24 -0
  135. package/dist/test/unit/record-history-path.test.js.map +1 -0
  136. package/firestore.indexes.json +39 -0
  137. package/package.json +23 -6
@@ -0,0 +1,33 @@
1
+ import test from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { mergeNativePhysicalRows, pickWinningPhysicalRow } from "../../src/catalox/native-catalog-merge.js";
4
+ const compositeIdentity = {
5
+ itemIdStrategy: "composite",
6
+ compositeFields: ["categoryId", "code"],
7
+ };
8
+ function row(scope, data, itemId = "core:S1") {
9
+ return {
10
+ itemId,
11
+ catalogId: "c1",
12
+ data,
13
+ createdAt: "2020-01-01T00:00:00.000Z",
14
+ updatedAt: "2020-01-02T00:00:00.000Z",
15
+ ...(scope != null ? { scope } : {}),
16
+ indexed: { scopeLayer: "global" },
17
+ };
18
+ }
19
+ test("mergeNativePhysicalRows overlays user over global by composite identity", () => {
20
+ const g = row({ kind: "global" }, { categoryId: "core", code: "S1", title: "Global" });
21
+ const u = row({ kind: "user", accountId: "a1", userId: "u1" }, { categoryId: "core", code: "S1", title: "User" }, "core:S1");
22
+ u.indexed = { scopeLayer: "user", scopeAccountId: "a1", scopeUserId: "u1" };
23
+ const merged = mergeNativePhysicalRows([g, u], compositeIdentity, "app1", false);
24
+ assert.equal(merged.length, 1);
25
+ assert.equal(merged[0].data.title, "User");
26
+ });
27
+ test("pickWinningPhysicalRow prefers user scoped row", () => {
28
+ const g = row({ kind: "global" }, { x: 1 });
29
+ const u = row({ kind: "user", accountId: "a1", userId: "u1" }, { x: 2 });
30
+ const w = pickWinningPhysicalRow([g, u], { accountId: "a1", userId: "u1" });
31
+ assert.equal(w?.scope?.kind, "user");
32
+ });
33
+ //# sourceMappingURL=native-catalog-merge.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-catalog-merge.test.js","sourceRoot":"","sources":["../../../test/unit/native-catalog-merge.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAI5G,MAAM,iBAAiB,GAA8B;IACnD,cAAc,EAAE,WAAW;IAC3B,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,C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C;AAEH,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;IAC1D,MAAM,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAC5C,MAAM,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACzE,MAAM,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5E,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=native-scope.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-scope.test.d.ts","sourceRoot":"","sources":["../../../test/unit/native-scope.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ import test from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { assertSuperAdminForNonGlobalScope, decodeNativeItemStorageDocId, encodeNativeItemStorageDocId, physicalRowMatchesFetchScope, } from "../../src/catalox/native-scope.js";
4
+ import { CatalogAccessDeniedError } from "../../src/contracts/errors.js";
5
+ test("encode/decode roundtrip for account scope", () => {
6
+ const logical = "core:S1";
7
+ const scope = { kind: "account", accountId: "acc1" };
8
+ const id = encodeNativeItemStorageDocId(logical, scope);
9
+ const dec = decodeNativeItemStorageDocId(id);
10
+ assert.ok(dec);
11
+ assert.equal(dec.logicalItemId, logical);
12
+ assert.deepEqual(dec.scope, scope);
13
+ });
14
+ test("global scope uses logical id as storage doc id", () => {
15
+ const id = encodeNativeItemStorageDocId("x:y", { kind: "global" });
16
+ assert.equal(id, "x:y");
17
+ assert.deepEqual(decodeNativeItemStorageDocId("x:y"), { logicalItemId: "x:y", scope: { kind: "global" } });
18
+ });
19
+ test("physicalRowMatchesFetchScope for account audience", () => {
20
+ const row = { kind: "account", accountId: "a1", agentIds: ["ag1"] };
21
+ assert.equal(physicalRowMatchesFetchScope(row, { accountId: "a1", agentId: "ag1" }), true);
22
+ assert.equal(physicalRowMatchesFetchScope(row, { accountId: "a1" }), false);
23
+ });
24
+ test("assertSuperAdminForNonGlobalScope throws without superAdmin", () => {
25
+ assert.throws(() => assertSuperAdminForNonGlobalScope(false, { kind: "account", accountId: "x" }), (e) => e instanceof CatalogAccessDeniedError);
26
+ assert.doesNotThrow(() => assertSuperAdminForNonGlobalScope(true, { kind: "account", accountId: "x" }));
27
+ assert.doesNotThrow(() => assertSuperAdminForNonGlobalScope(false, { kind: "global" }));
28
+ });
29
+ //# sourceMappingURL=native-scope.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-scope.test.js","sourceRoot":"","sources":["../../../test/unit/native-scope.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EACL,iCAAiC,EACjC,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACrD,MAAM,OAAO,GAAG,SAAS,CAAC;IAC1B,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,SAAkB,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IAC9D,MAAM,EAAE,GAAG,4BAA4B,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,4BAA4B,CAAC,EAAE,CAAC,CAAC;IAC7C,MAAM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,EAAE,EAAE,CAAC,CAAC,YAAY,wBAAwB,CAC7C,CAAC;IACF,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACxG,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC1F,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=record-history-path.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-history-path.test.d.ts","sourceRoot":"","sources":["../../../test/unit/record-history-path.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ import test from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { buildRecordHistoryGcsRelativePath, fingerprintNativeRecord } from "../../src/catalox/record-history.js";
4
+ test("buildRecordHistoryGcsRelativePath encodes date segments and op", () => {
5
+ const rel = buildRecordHistoryGcsRelativePath({
6
+ catalogId: "signals",
7
+ op: "update",
8
+ itemId: "a:b",
9
+ ts: "2026-04-19T12:00:00.000Z",
10
+ });
11
+ assert.match(rel, /^records\/signals\/2026\/04\/19\//);
12
+ assert.match(rel, /__update__[a-f0-9]{16}\.ndjson$/);
13
+ });
14
+ test("fingerprintNativeRecord is stable for same record", () => {
15
+ const rec = {
16
+ itemId: "x",
17
+ catalogId: "c",
18
+ data: { n: 1 },
19
+ createdAt: "t0",
20
+ updatedAt: "t1",
21
+ };
22
+ assert.equal(fingerprintNativeRecord(rec), fingerprintNativeRecord({ ...rec }));
23
+ });
24
+ //# sourceMappingURL=record-history-path.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record-history-path.test.js","sourceRoot":"","sources":["../../../test/unit/record-history-path.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,iCAAiC,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAEjH,IAAI,CAAC,gEAAgE,EAAE,GAAG,EAAE;IAC1E,MAAM,GAAG,GAAG,iCAAiC,CAAC;QAC5C,SAAS,EAAE,SAAS;QACpB,EAAE,EAAE,QAAQ;QACZ,MAAM,EAAE,KAAK;QACb,EAAE,EAAE,0BAA0B;KAC/B,CAAC,CAAC;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,mCAAmC,CAAC,CAAC;IACvD,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,iCAAiC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,mDAAmD,EAAE,GAAG,EAAE;IAC7D,MAAM,GAAG,GAAG;QACV,MAAM,EAAE,GAAG;QACX,SAAS,EAAE,GAAG;QACd,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;QACd,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;KAChB,CAAC;IACF,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,uBAAuB,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ {
2
+ "indexes": [
3
+ {
4
+ "collectionGroup": "catalogItemHistory",
5
+ "queryScope": "COLLECTION",
6
+ "fields": [
7
+ { "fieldPath": "catalogId", "order": "ASCENDING" },
8
+ { "fieldPath": "ts", "order": "DESCENDING" }
9
+ ]
10
+ },
11
+ {
12
+ "collectionGroup": "catalogItemHistory",
13
+ "queryScope": "COLLECTION",
14
+ "fields": [
15
+ { "fieldPath": "catalogId", "order": "ASCENDING" },
16
+ { "fieldPath": "itemId", "order": "ASCENDING" },
17
+ { "fieldPath": "ts", "order": "DESCENDING" }
18
+ ]
19
+ },
20
+ {
21
+ "collectionGroup": "catalogItemHistory",
22
+ "queryScope": "COLLECTION",
23
+ "fields": [
24
+ { "fieldPath": "catalogId", "order": "ASCENDING" },
25
+ { "fieldPath": "op", "order": "ASCENDING" },
26
+ { "fieldPath": "ts", "order": "DESCENDING" }
27
+ ]
28
+ },
29
+ {
30
+ "collectionGroup": "catalogItemHistory",
31
+ "queryScope": "COLLECTION",
32
+ "fields": [
33
+ { "fieldPath": "catalogId", "order": "ASCENDING" },
34
+ { "fieldPath": "ts", "order": "ASCENDING" }
35
+ ]
36
+ }
37
+ ],
38
+ "fieldOverrides": []
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/catalox",
3
- "version": "2.7.0",
3
+ "version": "3.1.1",
4
4
  "description": "Catalox: Firebase-native catalog metadata + unification package.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -22,19 +22,36 @@
22
22
  ],
23
23
  "exports": {
24
24
  ".": {
25
- "types": "./dist/index.d.ts",
26
- "default": "./dist/index.js"
25
+ "types": "./dist/src/index.d.ts",
26
+ "default": "./dist/src/index.js"
27
+ },
28
+ "./embedder": {
29
+ "types": "./dist/src/embedder.d.ts",
30
+ "default": "./dist/src/embedder.js"
31
+ },
32
+ "./operator": {
33
+ "types": "./dist/src/operator.d.ts",
34
+ "default": "./dist/src/operator.js"
35
+ },
36
+ "./mapping": {
37
+ "types": "./dist/src/mapping/index.d.ts",
38
+ "default": "./dist/src/mapping/index.js"
39
+ },
40
+ "./firebase": {
41
+ "types": "./dist/src/firebase/index.d.ts",
42
+ "default": "./dist/src/firebase/index.js"
27
43
  }
28
44
  },
29
45
  "bin": {
30
46
  "catalox": "./dist/src/cli/index.js"
31
47
  },
32
- "main": "./dist/index.js",
33
- "types": "./dist/index.d.ts",
48
+ "main": "./dist/src/index.js",
49
+ "types": "./dist/src/index.d.ts",
34
50
  "files": [
35
51
  "dist",
36
52
  "README.md",
37
- "LICENSE"
53
+ "LICENSE",
54
+ "firestore.indexes.json"
38
55
  ],
39
56
  "scripts": {
40
57
  "cli": "node dist/src/cli/index.js",