declastruct 1.6.0 → 1.7.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/dist/contract/cli/apply.js +10 -3
- package/dist/contract/cli/apply.js.map +1 -1
- package/dist/contract/cli/plan.js +8 -3
- package/dist/contract/cli/plan.js.map +1 -1
- package/dist/contract/sdk/index.d.ts +1 -0
- package/dist/contract/sdk/index.js +4 -1
- package/dist/contract/sdk/index.js.map +1 -1
- package/dist/domain.objects/DeclastructDao.d.ts +11 -11
- package/dist/domain.objects/DeclastructDao.js.map +1 -1
- package/dist/domain.objects/genDeclastructDao.d.ts +15 -7
- package/dist/domain.objects/genDeclastructDao.js +25 -6
- package/dist/domain.objects/genDeclastructDao.js.map +1 -1
- package/dist/domain.objects/symbols.d.ts +5 -0
- package/dist/domain.objects/symbols.js +9 -0
- package/dist/domain.objects/symbols.js.map +1 -0
- package/dist/domain.operations/apply/applyChange.js +2 -2
- package/dist/domain.operations/apply/applyChange.js.map +1 -1
- package/dist/domain.operations/del/del.d.ts +27 -0
- package/dist/domain.operations/del/del.js +33 -0
- package/dist/domain.operations/del/del.js.map +1 -0
- package/dist/domain.operations/plan/planChanges.js +4 -1
- package/dist/domain.operations/plan/planChanges.js.map +1 -1
- package/package.json +12 -10
- package/readme.md +4 -4
- package/dist/domain/constants.d.ts +0 -3
- package/dist/domain/constants.js +0 -5
- package/dist/domain/constants.js.map +0 -1
|
@@ -33,6 +33,7 @@ const fs_1 = require("fs");
|
|
|
33
33
|
const promises_1 = require("fs/promises");
|
|
34
34
|
const helpful_errors_1 = require("helpful-errors");
|
|
35
35
|
const path_1 = require("path");
|
|
36
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
36
37
|
const DeclastructPlan_1 = require("../../domain.objects/DeclastructPlan");
|
|
37
38
|
const applyChanges_1 = require("../../domain.operations/apply/applyChanges");
|
|
38
39
|
const log = console;
|
|
@@ -76,12 +77,18 @@ const executeApplyCommand = async (input) => {
|
|
|
76
77
|
// validate wish file exists
|
|
77
78
|
if (!(0, fs_1.existsSync)(resolvedWishPath))
|
|
78
79
|
throw new helpful_errors_1.BadRequestError(`Wish file not found: ${resolvedWishPath}`);
|
|
80
|
+
// get git root for relative path display
|
|
81
|
+
const gitRoot = await (0, rhachet_artifact_git_1.getGitRepoRoot)({ from: process.cwd() });
|
|
82
|
+
const relativePlanPath = resolvedPlanPath
|
|
83
|
+
? (0, path_1.relative)(gitRoot, resolvedPlanPath)
|
|
84
|
+
: null;
|
|
85
|
+
const relativeWishPath = (0, path_1.relative)(gitRoot, resolvedWishPath);
|
|
79
86
|
// log header
|
|
80
87
|
log.info('');
|
|
81
88
|
log.info('🌊 declastruct apply');
|
|
82
|
-
if (
|
|
83
|
-
log.info(` plan: ${
|
|
84
|
-
log.info(` wish: ${
|
|
89
|
+
if (relativePlanPath)
|
|
90
|
+
log.info(` plan: ${relativePlanPath}`);
|
|
91
|
+
log.info(` wish: ${relativeWishPath}`);
|
|
85
92
|
log.info('');
|
|
86
93
|
// import wish file
|
|
87
94
|
const wish = await Promise.resolve(`${resolvedWishPath}`).then(s => __importStar(require(s)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/contract/cli/apply.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAAoC;AACpC,2BAAgC;AAChC,0CAAuC;AACvC,mDAAiD;AACjD,+
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/contract/cli/apply.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAAoC;AACpC,2BAAgC;AAChC,0CAAuC;AACvC,mDAAiD;AACjD,+BAAyC;AACzC,+DAAsD;AAEtD,0EAAuE;AACvE,6EAA0E;AAE1E,MAAM,GAAG,GAAG,OAAO,CAAC;AAEpB;;;;;;GAMG;AACI,MAAM,mBAAmB,GAA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CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAElE,iBAAiB;IACjB,MAAM,OAAO,GAAG;QACd,UAAU,EAAE,IAAI,oBAAU,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;QAChD,GAAG;KACJ,CAAC;IAEF,oEAAoE;IACpE,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAY,EAC/B;QACE,IAAI;QACJ,SAAS;QACT,SAAS;KACV,EACD,OAAO,CACR,CAAC;IAEF,oBAAoB;IACpB,gBAAgB;IAChB,mCAAmC;IACnC,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAEjE,cAAc;IACd,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACb,GAAG,CAAC,IAAI,CAAC,cAAc,MAAM,CAAC,cAAc,CAAC,MAAM,UAAU,CAAC,CAAC;IAC/D,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACf,CAAC,CAAC;AA9FW,QAAA,mBAAmB,uBA8F9B"}
|
|
@@ -33,6 +33,7 @@ const fs_1 = require("fs");
|
|
|
33
33
|
const promises_1 = require("fs/promises");
|
|
34
34
|
const helpful_errors_1 = require("helpful-errors");
|
|
35
35
|
const path_1 = require("path");
|
|
36
|
+
const rhachet_artifact_git_1 = require("rhachet-artifact-git");
|
|
36
37
|
const planChanges_1 = require("../../domain.operations/plan/planChanges");
|
|
37
38
|
const log = console;
|
|
38
39
|
/**
|
|
@@ -44,14 +45,18 @@ const executePlanCommand = async ({ wishFilePath, planFilePath, }) => {
|
|
|
44
45
|
// resolve paths
|
|
45
46
|
const resolvedWishPath = (0, path_1.resolve)(process.cwd(), wishFilePath);
|
|
46
47
|
const resolvedPlanPath = (0, path_1.resolve)(process.cwd(), planFilePath);
|
|
48
|
+
// get git root for relative path display
|
|
49
|
+
const gitRoot = await (0, rhachet_artifact_git_1.getGitRepoRoot)({ from: process.cwd() });
|
|
50
|
+
const relativeWishPath = (0, path_1.relative)(gitRoot, resolvedWishPath);
|
|
51
|
+
const relativePlanPath = (0, path_1.relative)(gitRoot, resolvedPlanPath);
|
|
47
52
|
// validate wish file exists
|
|
48
53
|
if (!(0, fs_1.existsSync)(resolvedWishPath)) {
|
|
49
54
|
throw new helpful_errors_1.BadRequestError(`Wish file not found: ${resolvedWishPath}`);
|
|
50
55
|
}
|
|
51
56
|
log.info('');
|
|
52
57
|
log.info('🌊 declastruct plan');
|
|
53
|
-
log.info(` wish: ${
|
|
54
|
-
log.info(` plan: ${
|
|
58
|
+
log.info(` wish: ${relativeWishPath}`);
|
|
59
|
+
log.info(` plan: ${relativePlanPath}`);
|
|
55
60
|
log.info('');
|
|
56
61
|
// import wish file
|
|
57
62
|
const wish = await Promise.resolve(`${resolvedWishPath}`).then(s => __importStar(require(s)));
|
|
@@ -91,7 +96,7 @@ const executePlanCommand = async ({ wishFilePath, planFilePath, }) => {
|
|
|
91
96
|
// log summary
|
|
92
97
|
log.info('');
|
|
93
98
|
log.info(`🌊 planned for ${plan.changes.length} resources`);
|
|
94
|
-
log.info(` into ${
|
|
99
|
+
log.info(` into ${relativePlanPath}`);
|
|
95
100
|
log.info('');
|
|
96
101
|
};
|
|
97
102
|
exports.executePlanCommand = executePlanCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/contract/cli/plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAAoC;AACpC,2BAAgC;AAChC,0CAA+C;AAC/C,mDAAiD;AACjD,+
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/contract/cli/plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAAoC;AACp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AC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAEjE,cAAc;IACd,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACb,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,MAAM,YAAY,CAAC,CAAC;IAC5D,GAAG,CAAC,IAAI,CAAC,WAAW,gBAAgB,EAAE,CAAC,CAAC;IACxC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACf,CAAC,CAAC;AA/EW,QAAA,kBAAkB,sBA+E7B"}
|
|
@@ -7,5 +7,6 @@ export { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
|
7
7
|
export type { DeclastructDaoInput, DeclastructDaoWithRef, DeclastructDaoWoutRef, } from '../../domain.objects/genDeclastructDao';
|
|
8
8
|
export { genDeclastructDao } from '../../domain.objects/genDeclastructDao';
|
|
9
9
|
export type { IsoTimestamp } from '../../domain.objects/IsoTimestamp';
|
|
10
|
+
export { del, isMarkedForDeletion } from '../../domain.operations/del/del';
|
|
10
11
|
export { getRefByPrimary } from '../../domain.operations/ref/getRefByPrimary';
|
|
11
12
|
export { getRefByUnique } from '../../domain.operations/ref/getRefByUnique';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// domain objects
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getRefByUnique = exports.getRefByPrimary = exports.genDeclastructDao = exports.DeclastructProvider = exports.DeclastructPlan = exports.DeclastructDao = exports.DeclastructChangeAction = exports.DeclastructChange = void 0;
|
|
4
|
+
exports.getRefByUnique = exports.getRefByPrimary = exports.isMarkedForDeletion = exports.del = exports.genDeclastructDao = exports.DeclastructProvider = exports.DeclastructPlan = exports.DeclastructDao = exports.DeclastructChangeAction = exports.DeclastructChange = void 0;
|
|
5
5
|
var DeclastructChange_1 = require("../../domain.objects/DeclastructChange");
|
|
6
6
|
Object.defineProperty(exports, "DeclastructChange", { enumerable: true, get: function () { return DeclastructChange_1.DeclastructChange; } });
|
|
7
7
|
Object.defineProperty(exports, "DeclastructChangeAction", { enumerable: true, get: function () { return DeclastructChange_1.DeclastructChangeAction; } });
|
|
@@ -15,6 +15,9 @@ Object.defineProperty(exports, "DeclastructProvider", { enumerable: true, get: f
|
|
|
15
15
|
var genDeclastructDao_1 = require("../../domain.objects/genDeclastructDao");
|
|
16
16
|
Object.defineProperty(exports, "genDeclastructDao", { enumerable: true, get: function () { return genDeclastructDao_1.genDeclastructDao; } });
|
|
17
17
|
// domain operations
|
|
18
|
+
var del_1 = require("../../domain.operations/del/del");
|
|
19
|
+
Object.defineProperty(exports, "del", { enumerable: true, get: function () { return del_1.del; } });
|
|
20
|
+
Object.defineProperty(exports, "isMarkedForDeletion", { enumerable: true, get: function () { return del_1.isMarkedForDeletion; } });
|
|
18
21
|
var getRefByPrimary_1 = require("../../domain.operations/ref/getRefByPrimary");
|
|
19
22
|
Object.defineProperty(exports, "getRefByPrimary", { enumerable: true, get: function () { return getRefByPrimary_1.getRefByPrimary; } });
|
|
20
23
|
var getRefByUnique_1 = require("../../domain.operations/ref/getRefByUnique");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdk/index.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;AAIjB,4EAGgD;AAF9C,sHAAA,iBAAiB,OAAA;AACjB,4HAAA,uBAAuB,OAAA;AAEzB,sEAAqE;AAA5D,gHAAA,cAAc,OAAA;AACvB,wEAAuE;AAA9D,kHAAA,eAAe,OAAA;AACxB,gFAA+E;AAAtE,0HAAA,mBAAmB,OAAA;AAM5B,YAAY;AACZ,4EAA2E;AAAlE,sHAAA,iBAAiB,OAAA;AAE1B,oBAAoB;AACpB,+EAA8E;AAArE,kHAAA,eAAe,OAAA;AACxB,6EAA4E;AAAnE,gHAAA,cAAc,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdk/index.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;AAIjB,4EAGgD;AAF9C,sHAAA,iBAAiB,OAAA;AACjB,4HAAA,uBAAuB,OAAA;AAEzB,sEAAqE;AAA5D,gHAAA,cAAc,OAAA;AACvB,wEAAuE;AAA9D,kHAAA,eAAe,OAAA;AACxB,gFAA+E;AAAtE,0HAAA,mBAAmB,OAAA;AAM5B,YAAY;AACZ,4EAA2E;AAAlE,sHAAA,iBAAiB,OAAA;AAE1B,oBAAoB;AACpB,uDAA2E;AAAlE,0FAAA,GAAG,OAAA;AAAE,0GAAA,mBAAmB,OAAA;AACjC,+EAA8E;AAArE,kHAAA,eAAe,OAAA;AACxB,6EAA4E;AAAnE,gHAAA,cAAc,OAAA"}
|
|
@@ -34,9 +34,9 @@ export interface DeclastructDao<TResourceClass extends Refable<any, any, any>, T
|
|
|
34
34
|
* .what = fetch by primary keys
|
|
35
35
|
* .why = enables efficient lookups when primary key is known
|
|
36
36
|
*
|
|
37
|
-
* .note =
|
|
37
|
+
* .note = undefined if resource lacks primary keys; would be null, but that breaks bivariance
|
|
38
38
|
*/
|
|
39
|
-
byPrimary
|
|
39
|
+
byPrimary?(input: RefByPrimary<TResourceClass>, context: TContext): Promise<InstanceType<TResourceClass> | null>;
|
|
40
40
|
/**
|
|
41
41
|
* .what = fetch by any supported reference type
|
|
42
42
|
* .why = enables flexible lookups when ref type is not known at compile time
|
|
@@ -54,16 +54,16 @@ export interface DeclastructDao<TResourceClass extends Refable<any, any, any>, T
|
|
|
54
54
|
* .what = resolve any ref to RefByPrimary
|
|
55
55
|
* .why = enables getting primary key from any ref type
|
|
56
56
|
*
|
|
57
|
-
* .note =
|
|
57
|
+
* .note = undefined if resource lacks primary keys; would be null, but that breaks bivariance
|
|
58
58
|
*/
|
|
59
|
-
byPrimary
|
|
59
|
+
byPrimary?(input: Ref<TResourceClass>, context: TContext): Promise<RefByPrimary<TResourceClass> | null>;
|
|
60
60
|
/**
|
|
61
61
|
* .what = resolve any ref to RefByUnique
|
|
62
62
|
* .why = enables getting unique key from any ref type
|
|
63
63
|
*
|
|
64
|
-
* .note =
|
|
64
|
+
* .note = undefined if resource lacks primary keys; would be null, but that breaks bivariance
|
|
65
65
|
*/
|
|
66
|
-
byUnique
|
|
66
|
+
byUnique?(input: Ref<TResourceClass>, context: TContext): Promise<RefByUnique<TResourceClass> | null>;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
@@ -75,21 +75,21 @@ export interface DeclastructDao<TResourceClass extends Refable<any, any, any>, T
|
|
|
75
75
|
* .what = find or insert resource
|
|
76
76
|
* .why = idempotent create - returns existing if found by unique keys, otherwise creates
|
|
77
77
|
*/
|
|
78
|
-
|
|
78
|
+
findsert(input: InstanceType<TResourceClass>, context: TContext): Promise<HasMetadata<InstanceType<TResourceClass>>>;
|
|
79
79
|
/**
|
|
80
80
|
* .what = create or update resource
|
|
81
81
|
* .why = idempotent upsert - creates if not found, updates if found
|
|
82
82
|
*
|
|
83
|
-
* .note =
|
|
83
|
+
* .note = undefined if resource does not support updates; would be null, but that breaks bivariance
|
|
84
84
|
*/
|
|
85
|
-
upsert
|
|
85
|
+
upsert?(input: InstanceType<TResourceClass>, context: TContext): Promise<HasMetadata<InstanceType<TResourceClass>>>;
|
|
86
86
|
/**
|
|
87
87
|
* .what = delete resource
|
|
88
88
|
* .why = removes resource from remote state
|
|
89
89
|
*
|
|
90
|
-
* .note =
|
|
90
|
+
* .note = undefined if resource does not support deletion; would be null, but that breaks bivariance
|
|
91
91
|
*/
|
|
92
|
-
delete
|
|
92
|
+
delete?(input: Ref<TResourceClass>, context: TContext): Promise<void>;
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
95
|
export declare class DeclastructDao<TResourceClass extends Refable<any, any, any>, TContext> extends DomainLiteral<DeclastructDao<TResourceClass, TContext>> implements DeclastructDao<TResourceClass, TContext> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclastructDao.js","sourceRoot":"","sources":["../../src/domain.objects/DeclastructDao.ts"],"names":[],"mappings":";;;AAAA,mDAMwB;
|
|
1
|
+
{"version":3,"file":"DeclastructDao.js","sourceRoot":"","sources":["../../src/domain.objects/DeclastructDao.ts"],"names":[],"mappings":";;;AAAA,mDAMwB;AAgIxB,MAAa,cAIX,SAAQ,8BAAuD;CACT;AALxD,wCAKwD"}
|
|
@@ -3,10 +3,17 @@ import type { DeclastructDao } from './DeclastructDao';
|
|
|
3
3
|
/**
|
|
4
4
|
* .what = input type for genDeclastructDao without get.ref and get.one.byRef (auto-wired by factory)
|
|
5
5
|
* .why = derives from DeclastructDao to stay in sync, omits auto-wired methods
|
|
6
|
+
* .note = uses `| null` syntax to force explicit decision on nullable methods
|
|
6
7
|
*/
|
|
7
|
-
export type DeclastructDaoInput<TResourceClass extends Refable<any, any, any>, TContext> = Omit<DeclastructDao<TResourceClass, TContext>, 'get'> & {
|
|
8
|
+
export type DeclastructDaoInput<TResourceClass extends Refable<any, any, any>, TContext> = Omit<DeclastructDao<TResourceClass, TContext>, 'get' | 'set'> & {
|
|
8
9
|
get: {
|
|
9
|
-
one: Omit<DeclastructDao<TResourceClass, TContext>['get']['one'], 'byRef'
|
|
10
|
+
one: Omit<DeclastructDao<TResourceClass, TContext>['get']['one'], 'byRef' | 'byPrimary'> & {
|
|
11
|
+
byPrimary: ((input: RefByPrimary<TResourceClass>, context: TContext) => Promise<InstanceType<TResourceClass> | null>) | null;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
set: Omit<DeclastructDao<TResourceClass, TContext>['set'], 'upsert' | 'delete'> & {
|
|
15
|
+
upsert: ((input: InstanceType<TResourceClass>, context: TContext) => Promise<InstanceType<TResourceClass>>) | null;
|
|
16
|
+
delete: ((input: Ref<TResourceClass>, context: TContext) => Promise<void>) | null;
|
|
10
17
|
};
|
|
11
18
|
};
|
|
12
19
|
/**
|
|
@@ -34,26 +41,27 @@ export type DeclastructDaoInputWoutPrimary<TResourceClass extends Refable<any, a
|
|
|
34
41
|
/**
|
|
35
42
|
* .what = output type for daos with ref methods defined
|
|
36
43
|
* .why = enables type-safe access to ref resolution methods
|
|
44
|
+
* .note = uses method syntax for bivariance (enables assignment to DeclastructDao<any>)
|
|
37
45
|
*/
|
|
38
46
|
export type DeclastructDaoWithRef<TResourceClass extends Refable<any, any, any>, TContext> = Omit<DeclastructDao<TResourceClass, TContext>, 'get'> & {
|
|
39
47
|
get: {
|
|
40
48
|
one: DeclastructDao<TResourceClass, TContext>['get']['one'];
|
|
41
49
|
ref: {
|
|
42
|
-
byPrimary
|
|
43
|
-
byUnique
|
|
50
|
+
byPrimary(input: Ref<TResourceClass>, context: TContext): Promise<RefByPrimary<TResourceClass> | null>;
|
|
51
|
+
byUnique(input: Ref<TResourceClass>, context: TContext): Promise<RefByUnique<TResourceClass> | null>;
|
|
44
52
|
};
|
|
45
53
|
};
|
|
46
54
|
};
|
|
47
55
|
/**
|
|
48
56
|
* .what = output type for daos without ref methods
|
|
49
|
-
* .why =
|
|
57
|
+
* .why = ref methods are undefined when byPrimary is not supported
|
|
50
58
|
*/
|
|
51
59
|
export type DeclastructDaoWoutRef<TResourceClass extends Refable<any, any, any>, TContext> = Omit<DeclastructDao<TResourceClass, TContext>, 'get'> & {
|
|
52
60
|
get: {
|
|
53
61
|
one: DeclastructDao<TResourceClass, TContext>['get']['one'];
|
|
54
62
|
ref: {
|
|
55
|
-
byPrimary:
|
|
56
|
-
byUnique:
|
|
63
|
+
byPrimary: undefined;
|
|
64
|
+
byUnique: undefined;
|
|
57
65
|
};
|
|
58
66
|
};
|
|
59
67
|
};
|
|
@@ -12,19 +12,27 @@ function genDeclastructDao(input) {
|
|
|
12
12
|
const hasPrimary = input.get.one.byPrimary !== null;
|
|
13
13
|
// build byRef from byUnique + byPrimary
|
|
14
14
|
const byRef = async (ref, context) => {
|
|
15
|
-
|
|
15
|
+
// check primary key first (only if resource declares .primary)
|
|
16
|
+
if (hasPrimary && (0, domain_objects_1.isRefByPrimary)({ of: input.dobj })(ref))
|
|
16
17
|
return input.get.one.byPrimary(ref, context);
|
|
18
|
+
// check unique key
|
|
17
19
|
if ((0, domain_objects_1.isRefByUnique)({ of: input.dobj })(ref))
|
|
18
20
|
return input.get.one.byUnique(ref, context);
|
|
19
21
|
throw new helpful_errors_1.BadRequestError('get.one.byRef called with neither a RefByUnique nor RefByPrimary', { ref });
|
|
20
22
|
};
|
|
23
|
+
// convert null → undefined for optional methods
|
|
24
|
+
const upsert = input.set.upsert ?? undefined;
|
|
25
|
+
const del = input.set.delete ?? undefined;
|
|
21
26
|
if (hasPrimary) {
|
|
22
27
|
// auto-wire ref methods using the helper functions
|
|
28
|
+
// convert null → undefined for byPrimary (input requires null, output uses undefined)
|
|
29
|
+
const byPrimary = input.get.one.byPrimary ?? undefined;
|
|
23
30
|
const dao = {
|
|
24
31
|
...input,
|
|
25
32
|
get: {
|
|
26
33
|
one: {
|
|
27
|
-
|
|
34
|
+
byUnique: input.get.one.byUnique,
|
|
35
|
+
byPrimary,
|
|
28
36
|
byRef,
|
|
29
37
|
},
|
|
30
38
|
ref: {
|
|
@@ -32,22 +40,33 @@ function genDeclastructDao(input) {
|
|
|
32
40
|
byUnique: (ref, context) => (0, getRefByUnique_1.getRefByUnique)({ ref }, { dao, ...context }),
|
|
33
41
|
},
|
|
34
42
|
},
|
|
43
|
+
set: {
|
|
44
|
+
findsert: input.set.findsert,
|
|
45
|
+
upsert,
|
|
46
|
+
delete: del,
|
|
47
|
+
},
|
|
35
48
|
};
|
|
36
49
|
return dao;
|
|
37
50
|
}
|
|
38
|
-
// no primary key support - ref methods are
|
|
51
|
+
// no primary key support - ref methods are undefined
|
|
39
52
|
return {
|
|
40
53
|
...input,
|
|
41
54
|
get: {
|
|
42
55
|
one: {
|
|
43
|
-
|
|
56
|
+
byUnique: input.get.one.byUnique,
|
|
57
|
+
byPrimary: undefined,
|
|
44
58
|
byRef,
|
|
45
59
|
},
|
|
46
60
|
ref: {
|
|
47
|
-
byPrimary:
|
|
48
|
-
byUnique:
|
|
61
|
+
byPrimary: undefined,
|
|
62
|
+
byUnique: undefined,
|
|
49
63
|
},
|
|
50
64
|
},
|
|
65
|
+
set: {
|
|
66
|
+
findsert: input.set.findsert,
|
|
67
|
+
upsert,
|
|
68
|
+
delete: del,
|
|
69
|
+
},
|
|
51
70
|
};
|
|
52
71
|
}
|
|
53
72
|
exports.genDeclastructDao = genDeclastructDao;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genDeclastructDao.js","sourceRoot":"","sources":["../../src/domain.objects/genDeclastructDao.ts"],"names":[],"mappings":";;;AAAA,mDAOwB;AACxB,mDAAiD;AAEjD,8EAA2E;AAC3E,4EAAyE;
|
|
1
|
+
{"version":3,"file":"genDeclastructDao.js","sourceRoot":"","sources":["../../src/domain.objects/genDeclastructDao.ts"],"names":[],"mappings":";;;AAAA,mDAOwB;AACxB,mDAAiD;AAEjD,8EAA2E;AAC3E,4EAAyE;AAqJzE;;GAEG;AACH,SAAgB,iBAAiB,CAI/B,KAAoD;IAEpD,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,KAAK,IAAI,CAAC;IAEpD,wCAAwC;IACxC,MAAM,KAAK,GAAG,KAAK,EACjB,GAAwB,EACxB,OAAiB,EAC6B,EAAE;QAChD,+DAA+D;QAC/D,IAAI,UAAU,IAAI,IAAA,+BAAc,EAAC,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC;YACvD,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,SAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAEhD,mBAAmB;QACnB,IAAI,IAAA,8BAAa,EAAC,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC;YACxC,OAAO,KAAK,CAAC,GAAG,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,GAAG,CAAC,QAAQ;gBAChC,SAAS,EAAE,SAAS;gBACpB,KAAK;aACN;YACD,GAAG,EAAE;gBACH,SAAS,EAAE,SAAS;gBACpB,QAAQ,EAAE,SAAS;aACpB;SACF;QACD,GAAG,EAAE;YACH,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,QAAQ;YAC5B,MAAM;YACN,MAAM,EAAE,GAAG;SACZ;KACF,CAAC;AACJ,CAAC;AA/ED,8CA+EC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DECLASTRUCT_DELETE = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* .what = symbol used to mark resources for declarative deletion
|
|
6
|
+
* .why = enables del() wrapper to mark resources without polluting their interface
|
|
7
|
+
*/
|
|
8
|
+
exports.DECLASTRUCT_DELETE = Symbol.for('declastruct.delete');
|
|
9
|
+
//# sourceMappingURL=symbols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.js","sourceRoot":"","sources":["../../src/domain.objects/symbols.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACU,QAAA,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -25,7 +25,7 @@ const applyChange = async ({ resource, change, providers, }) => {
|
|
|
25
25
|
switch (change.action) {
|
|
26
26
|
case DeclastructChange_1.DeclastructChangeAction.CREATE:
|
|
27
27
|
// create new resource using provider context
|
|
28
|
-
await dao.set.
|
|
28
|
+
await dao.set.findsert(change.state.desired ??
|
|
29
29
|
helpful_errors_1.UnexpectedCodePathError.throw('expected change.state.desired for CREATE', { change }), providerContext);
|
|
30
30
|
return change;
|
|
31
31
|
case DeclastructChange_1.DeclastructChangeAction.UPDATE:
|
|
@@ -57,7 +57,7 @@ const applyChange = async ({ resource, change, providers, }) => {
|
|
|
57
57
|
}
|
|
58
58
|
await dao.set.delete(change.state.remote ??
|
|
59
59
|
helpful_errors_1.UnexpectedCodePathError.throw('expected change.state.remote for REPLACE', { change }), providerContext);
|
|
60
|
-
await dao.set.
|
|
60
|
+
await dao.set.findsert(change.state.desired ??
|
|
61
61
|
helpful_errors_1.UnexpectedCodePathError.throw('expected change.state.desired for REPLACE', { change }), providerContext);
|
|
62
62
|
return change;
|
|
63
63
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyChange.js","sourceRoot":"","sources":["../../../src/domain.operations/apply/applyChange.ts"],"names":[],"mappings":";;;AACA,mDAAyD;AAEzD,8EAGgD;AAEhD,+DAA4D;AAE5D;;;;GAIG;AACI,MAAM,WAAW,GAAG,KAAK,EAAE,EAChC,QAAQ,EACR,MAAM,EACN,SAAS,GAKV,EAA8B,EAAE;IAC/B,gCAAgC;IAChC,IAAI,MAAM,CAAC,MAAM,KAAK,2CAAuB,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;IAElE,uEAAuE;IACvE,IAAI,QAAQ,CAAC,WAAW,CAAC,IAAI,KAAK,MAAM,CAAC,WAAW,CAAC,KAAK;QACxD,MAAM,IAAI,wCAAuB,CAC/B,+DAA+D,EAC/D,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrB,CAAC;IAEJ,kDAAkD;IAClD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,IAAA,mCAAgB,EAAC;QACzD,QAAQ;QACR,SAAS;KACV,CAAC,CAAC;IAEH,sCAAsC;IACtC,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,2CAAuB,CAAC,MAAM;YACjC,6CAA6C;YAC7C,MAAM,GAAG,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"applyChange.js","sourceRoot":"","sources":["../../../src/domain.operations/apply/applyChange.ts"],"names":[],"mappings":";;;AACA,mDAAyD;AAEzD,8EAGgD;AAEhD,+DAA4D;AAE5D;;;;GAIG;AACI,M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-0,0 +1,27 @@
|
|
|
1
|
+
import type { DeclaredResource } from '../../domain.objects/DeclaredResource';
|
|
2
|
+
import { DECLASTRUCT_DELETE } from '../../domain.objects/symbols';
|
|
3
|
+
/**
|
|
4
|
+
* .what = marks a resource for deletion via declarative instruction
|
|
5
|
+
* .why = enables users to express deletion intent
|
|
6
|
+
*
|
|
7
|
+
* .how = attaches a symbol-keyed property to the resource object
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const getResources = async () => {
|
|
12
|
+
* const tokens = await getAllIamAuthTokens(...);
|
|
13
|
+
* return tokens.map(token => del(token)); // mark all for deletion
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare const del: <T extends DeclaredResource>(resource: T) => T & {
|
|
18
|
+
[DECLASTRUCT_DELETE]: true;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* .what = checks if a resource is marked for deletion
|
|
22
|
+
* .why = enables planChanges to detect deletion intent
|
|
23
|
+
* .note = type guard narrows to the marked type for downstream type safety
|
|
24
|
+
*/
|
|
25
|
+
export declare const isMarkedForDeletion: <T extends DeclaredResource>(resource: T) => resource is T & {
|
|
26
|
+
[DECLASTRUCT_DELETE]: true;
|
|
27
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMarkedForDeletion = exports.del = void 0;
|
|
4
|
+
const symbols_1 = require("../../domain.objects/symbols");
|
|
5
|
+
/**
|
|
6
|
+
* .what = marks a resource for deletion via declarative instruction
|
|
7
|
+
* .why = enables users to express deletion intent
|
|
8
|
+
*
|
|
9
|
+
* .how = attaches a symbol-keyed property to the resource object
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const getResources = async () => {
|
|
14
|
+
* const tokens = await getAllIamAuthTokens(...);
|
|
15
|
+
* return tokens.map(token => del(token)); // mark all for deletion
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
const del = (resource) => {
|
|
20
|
+
return Object.assign(resource, { [symbols_1.DECLASTRUCT_DELETE]: true });
|
|
21
|
+
};
|
|
22
|
+
exports.del = del;
|
|
23
|
+
/**
|
|
24
|
+
* .what = checks if a resource is marked for deletion
|
|
25
|
+
* .why = enables planChanges to detect deletion intent
|
|
26
|
+
* .note = type guard narrows to the marked type for downstream type safety
|
|
27
|
+
*/
|
|
28
|
+
const isMarkedForDeletion = (resource) => {
|
|
29
|
+
// biome-ignore lint/suspicious/noExplicitAny: symbol access requires any cast
|
|
30
|
+
return resource[symbols_1.DECLASTRUCT_DELETE] === true;
|
|
31
|
+
};
|
|
32
|
+
exports.isMarkedForDeletion = isMarkedForDeletion;
|
|
33
|
+
//# sourceMappingURL=del.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"del.js","sourceRoot":"","sources":["../../../src/domain.operations/del/del.ts"],"names":[],"mappings":";;;AACA,0DAAkE;AAElE;;;;;;;;;;;;;GAaG;AACI,MAAM,GAAG,GAAG,CACjB,QAAW,EACyB,EAAE;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,4BAAkB,CAAC,EAAE,IAAa,EAAE,CAAC,CAAC;AAC1E,CAAC,CAAC;AAJW,QAAA,GAAG,OAId;AAEF;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CACjC,QAAW,EACqC,EAAE;IAClD,8EAA8E;IAC9E,OAAQ,QAAgB,CAAC,4BAAkB,CAAC,KAAK,IAAI,CAAC;AACxD,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B"}
|
|
@@ -4,6 +4,7 @@ exports.planChanges = void 0;
|
|
|
4
4
|
const domain_objects_1 = require("domain-objects");
|
|
5
5
|
const DeclastructChange_1 = require("../../domain.objects/DeclastructChange");
|
|
6
6
|
const DeclastructPlan_1 = require("../../domain.objects/DeclastructPlan");
|
|
7
|
+
const del_1 = require("../../domain.operations/del/del");
|
|
7
8
|
const asIsoTimestamp_1 = require("../../infra/asIsoTimestamp");
|
|
8
9
|
const colorizeAction_1 = require("../../infra/colorizeAction");
|
|
9
10
|
const withSpinner_1 = require("../../infra/withSpinner");
|
|
@@ -42,9 +43,11 @@ const planChanges = async (input, context) => {
|
|
|
42
43
|
// log done (replaces spinner)
|
|
43
44
|
const durationSec = (durationMs / 1000).toFixed(2);
|
|
44
45
|
context.log.info(` ├─ ✔ done in ${durationSec}s`);
|
|
46
|
+
// determine desired state - null if marked for deletion
|
|
47
|
+
const desiredState = (0, del_1.isMarkedForDeletion)(resource) ? null : resource;
|
|
45
48
|
// compute change
|
|
46
49
|
const computed = (0, computeChange_1.computeChange)({
|
|
47
|
-
desired:
|
|
50
|
+
desired: desiredState,
|
|
48
51
|
remote: remoteState,
|
|
49
52
|
});
|
|
50
53
|
// log decision
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planChanges.js","sourceRoot":"","sources":["../../../src/domain.operations/plan/planChanges.ts"],"names":[],"mappings":";;;AAAA,mDAA4E;AAI5E,8EAAiF;AACjF,0EAAuE;AAEvE,+DAA4D;AAC5D,+DAA4D;AAC5D,yDAAsD;AACtD,mDAAgD;AAChD,yDAAsD;AACtD,+CAA4C;AAE5C;;;;GAIG;AACI,MAAM,WAAW,GAAG,KAAK,EAC9B,KAIC,EACD,OAA6C,EACnB,EAAE;IAC5B,wBAAwB;IACxB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAErB,kCAAkC;IAClC,MAAM,UAAU,GACd,QAAQ,IAAI,OAAO,CAAC,UAAU;QAC5B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM;QAC3B,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;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,CAAC,CAAC;IAChD,CAAC;IAED,cAAc;IACd,OAAO,IAAI,iCAAe,CAAC;QACzB,IAAI,EAAE,IAAA,yBAAW,EAAC,OAAO,CAAC;QAC1B,SAAS,EAAE,IAAA,+BAAc,EAAC,IAAI,IAAI,EAAE,CAAC;QACrC,IAAI,EAAE;YACJ,GAAG,EAAE,KAAK,CAAC,YAAY;SACxB;QACD,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC;AAtFW,QAAA,WAAW,eAsFtB"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "declastruct",
|
|
3
3
|
"author": "ehmpathy",
|
|
4
4
|
"description": "Add declarative control to any resource constructs. Declare, plan, and apply within an observable pit-of-success.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.7.1",
|
|
6
6
|
"repository": "ehmpathy/declastruct",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/declastruct",
|
|
8
8
|
"keywords": [
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build:ts": "tsc -p ./tsconfig.build.json",
|
|
30
30
|
"commit:with-cli": "npx cz",
|
|
31
|
-
"fix:format:biome": "biome check --write
|
|
31
|
+
"fix:format:biome": "biome check --write",
|
|
32
32
|
"fix:format": "npm run fix:format:biome",
|
|
33
|
-
"fix:lint": "biome check --write
|
|
33
|
+
"fix:lint": "biome check --write",
|
|
34
|
+
"fix": "npm run fix:format && npm run fix:lint",
|
|
34
35
|
"build:clean": "rm dist/ -rf",
|
|
35
36
|
"build:compile": "tsc -p ./tsconfig.build.json",
|
|
36
37
|
"build": "npm run build:clean && npm run build:compile",
|
|
@@ -38,9 +39,9 @@
|
|
|
38
39
|
"test:types": "tsc -p ./tsconfig.json --noEmit",
|
|
39
40
|
"test:format": "npm run test:format:biome",
|
|
40
41
|
"test:lint:deps": "npx depcheck -c ./.depcheckrc.yml",
|
|
41
|
-
"test:format:biome": "biome format
|
|
42
|
-
"test:lint:biome": "biome check
|
|
43
|
-
"test:lint:biome:all": "biome check
|
|
42
|
+
"test:format:biome": "biome format",
|
|
43
|
+
"test:lint:biome": "biome check --diagnostic-level=error",
|
|
44
|
+
"test:lint:biome:all": "biome check",
|
|
44
45
|
"test:lint": "npm run test:lint:biome && npm run test:lint:deps",
|
|
45
46
|
"test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
46
47
|
"test:integration": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
"preversion": "npm run prepush",
|
|
53
54
|
"postversion": "git push origin HEAD --tags --no-verify",
|
|
54
55
|
"prepare:husky": "npx husky install && chmod ug+x .husky/*",
|
|
55
|
-
"prepare": "[ -
|
|
56
|
+
"prepare": "[ -e .git ] && npm run prepare:husky || exit 0"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"bottleneck": "2.19.5",
|
|
@@ -60,6 +61,7 @@
|
|
|
60
61
|
"commander": "14.0.2",
|
|
61
62
|
"helpful-errors": "1.5.3",
|
|
62
63
|
"jest-diff": "30.0.2",
|
|
64
|
+
"rhachet-artifact-git": "1.1.3",
|
|
63
65
|
"simple-log-methods": "0.6.2",
|
|
64
66
|
"tsx": "4.20.6",
|
|
65
67
|
"type-fns": "1.21.0",
|
|
@@ -80,9 +82,9 @@
|
|
|
80
82
|
"@types/node": "22.15.29",
|
|
81
83
|
"cz-conventional-changelog": "3.3.0",
|
|
82
84
|
"declapract": "^0.13.0",
|
|
83
|
-
"declapract-typescript-ehmpathy": "
|
|
84
|
-
"declastruct": "
|
|
85
|
-
"declastruct-github": "
|
|
85
|
+
"declapract-typescript-ehmpathy": "0.43.16",
|
|
86
|
+
"declastruct": "1.5.1",
|
|
87
|
+
"declastruct-github": "1.0.7",
|
|
86
88
|
"depcheck": "1.4.3",
|
|
87
89
|
"esbuild-register": "3.6.0",
|
|
88
90
|
"husky": "8.0.3",
|
package/readme.md
CHANGED
|
@@ -171,7 +171,7 @@ instead of HCL, YAML, or another DSL:
|
|
|
171
171
|
declastruct providers follow a pit-of-success pattern that guarantees:
|
|
172
172
|
|
|
173
173
|
**idempotency** — all operations can be safely retried
|
|
174
|
-
- `
|
|
174
|
+
- `findsert`: find-or-insert (safe create)
|
|
175
175
|
- `upsert`: update-or-insert (safe update)
|
|
176
176
|
- repeat any operation multiple times, get the same result each time
|
|
177
177
|
|
|
@@ -222,7 +222,7 @@ interface DeclastructDao<TResource, TResourceClass, TContext> {
|
|
|
222
222
|
byRef: (ref: Ref, context) => Promise<TResource | null>;
|
|
223
223
|
};
|
|
224
224
|
set: {
|
|
225
|
-
|
|
225
|
+
findsert: (resource: TResource, context) => Promise<TResource>;
|
|
226
226
|
upsert?: (resource: TResource, context) => Promise<TResource>;
|
|
227
227
|
delete?: (ref: Ref, context) => Promise<void>;
|
|
228
228
|
};
|
|
@@ -348,7 +348,7 @@ const daoStripeCustomer = genDeclastructDao<
|
|
|
348
348
|
},
|
|
349
349
|
},
|
|
350
350
|
set: {
|
|
351
|
-
|
|
351
|
+
findsert: async (resource, context) => {
|
|
352
352
|
// find-or-insert: idempotent create
|
|
353
353
|
const foundBefore = await daoStripeCustomer.get.one.byUnique(
|
|
354
354
|
{ email: resource.email },
|
|
@@ -374,7 +374,7 @@ const daoStripeCustomer = genDeclastructDao<
|
|
|
374
374
|
});
|
|
375
375
|
return toResource(updated);
|
|
376
376
|
}
|
|
377
|
-
return daoStripeCustomer.set.
|
|
377
|
+
return daoStripeCustomer.set.findsert(resource, context);
|
|
378
378
|
},
|
|
379
379
|
delete: async (ref, context) => {
|
|
380
380
|
const foundBefore = await daoStripeCustomer.get.one.byRef(ref, context);
|
package/dist/domain/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/domain/constants.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|