declastruct 1.4.0 → 1.4.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/sdk/index.d.ts +3 -3
- package/dist/contract/sdk/index.js +4 -3
- package/dist/contract/sdk/index.js.map +1 -1
- package/dist/domain/constants.d.ts +3 -0
- package/dist/domain/constants.js +5 -0
- package/dist/domain/constants.js.map +1 -0
- package/dist/domain.objects/DeclastructDao.d.ts +1 -1
- package/dist/domain.objects/DeclastructPlan.d.ts +2 -2
- package/dist/domain.objects/DeclastructProvider.d.ts +1 -1
- package/dist/domain.objects/DeclastructProvider.js.map +1 -1
- package/dist/domain.operations/apply/applyChange.d.ts +3 -3
- package/dist/domain.operations/apply/applyChanges.d.ts +4 -4
- package/dist/domain.operations/plan/computeChange.d.ts +1 -1
- package/dist/domain.operations/plan/extractResourcesFromPlan.d.ts +2 -2
- package/dist/domain.operations/plan/getDaoByResource.d.ts +3 -3
- package/dist/domain.operations/plan/getDisplayableDiff.d.ts +1 -1
- package/dist/domain.operations/plan/getDisplayableDiff.js.map +1 -1
- package/dist/domain.operations/plan/hashChanges.d.ts +1 -1
- package/dist/domain.operations/plan/planChanges.d.ts +3 -3
- package/dist/domain.operations/plan/validate.d.ts +1 -1
- package/dist/infra/asIsoTimestamp.d.ts +1 -1
- package/package.json +25 -33
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { ContextDeclastruct } from '../../domain.objects/ContextDeclastruct';
|
|
2
2
|
export { DeclastructChange, DeclastructChangeAction, } from '../../domain.objects/DeclastructChange';
|
|
3
3
|
export { DeclastructDao } from '../../domain.objects/DeclastructDao';
|
|
4
|
-
export { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
5
4
|
export { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
6
|
-
export {
|
|
5
|
+
export { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
6
|
+
export type { IsoTimestamp } from '../../domain.objects/IsoTimestamp';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// domain objects
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
+
exports.DeclastructProvider = exports.DeclastructPlan = exports.DeclastructDao = exports.DeclastructChangeAction = exports.DeclastructChange = void 0;
|
|
4
5
|
var DeclastructChange_1 = require("../../domain.objects/DeclastructChange");
|
|
5
6
|
Object.defineProperty(exports, "DeclastructChange", { enumerable: true, get: function () { return DeclastructChange_1.DeclastructChange; } });
|
|
6
7
|
Object.defineProperty(exports, "DeclastructChangeAction", { enumerable: true, get: function () { return DeclastructChange_1.DeclastructChangeAction; } });
|
|
7
8
|
var DeclastructDao_1 = require("../../domain.objects/DeclastructDao");
|
|
8
9
|
Object.defineProperty(exports, "DeclastructDao", { enumerable: true, get: function () { return DeclastructDao_1.DeclastructDao; } });
|
|
9
|
-
var DeclastructProvider_1 = require("../../domain.objects/DeclastructProvider");
|
|
10
|
-
Object.defineProperty(exports, "DeclastructProvider", { enumerable: true, get: function () { return DeclastructProvider_1.DeclastructProvider; } });
|
|
11
10
|
var DeclastructPlan_1 = require("../../domain.objects/DeclastructPlan");
|
|
12
11
|
Object.defineProperty(exports, "DeclastructPlan", { enumerable: true, get: function () { return DeclastructPlan_1.DeclastructPlan; } });
|
|
12
|
+
var DeclastructProvider_1 = require("../../domain.objects/DeclastructProvider");
|
|
13
|
+
Object.defineProperty(exports, "DeclastructProvider", { enumerable: true, get: function () { return DeclastructProvider_1.DeclastructProvider; } });
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdk/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contract/sdk/index.ts"],"names":[],"mappings":";AAAA,iBAAiB;;;AAGjB,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/domain/constants.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DomainEntity, DomainLiteral, type Ref, type Refable, type RefByPrimary, type RefByUnique } from 'domain-objects';
|
|
2
|
-
import {
|
|
2
|
+
import type { HasMetadata } from 'type-fns';
|
|
3
3
|
/**
|
|
4
4
|
* .what = standardized data access interface for any resource type
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DomainEntity } from 'domain-objects';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { DeclastructChange } from './DeclastructChange';
|
|
3
|
+
import type { IsoTimestamp } from './IsoTimestamp';
|
|
4
4
|
/**
|
|
5
5
|
* .what = collection of all planned changes required to fulfill a wish
|
|
6
6
|
* .why = enables review, version control, and validation of infrastructure changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DomainLiteral } from 'domain-objects';
|
|
2
|
-
import {
|
|
2
|
+
import type { DeclastructDao } from './DeclastructDao';
|
|
3
3
|
export type DeclastructDaosShape<TContext> = Record<string, DeclastructDao<any, any, TContext>>;
|
|
4
4
|
/**
|
|
5
5
|
* .what = bundles all DAOs and lifecycle hooks for a specific infrastructure provider
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeclastructProvider.js","sourceRoot":"","sources":["../../src/domain.objects/DeclastructProvider.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;
|
|
1
|
+
{"version":3,"file":"DeclastructProvider.js","sourceRoot":"","sources":["../../src/domain.objects/DeclastructProvider.ts"],"names":[],"mappings":";;;AAAA,mDAA+C;AA0C/C,MAAa,mBAKX,SAAQ,8BAA8D;CACT;AAN/D,kDAM+D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DomainEntity } from 'domain-objects';
|
|
2
|
-
import { DeclastructChange } from '../../domain.objects/DeclastructChange';
|
|
3
|
-
import { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
1
|
+
import type { DomainEntity } from 'domain-objects';
|
|
2
|
+
import { type DeclastructChange } from '../../domain.objects/DeclastructChange';
|
|
3
|
+
import type { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
4
4
|
/**
|
|
5
5
|
* .what = applies a single change to infrastructure
|
|
6
6
|
* .why = executes the actual infrastructure modification
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type DomainEntity } from 'domain-objects';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
+
import type { ContextDeclastruct } from '../../domain.objects/ContextDeclastruct';
|
|
4
4
|
import { type DeclastructChange } from '../../domain.objects/DeclastructChange';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
6
|
+
import type { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
7
7
|
/**
|
|
8
8
|
* .what = applies changes to achieve desired state
|
|
9
9
|
* .why = executes infrastructure changes in a controlled, observable manner
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DomainEntity } from 'domain-objects';
|
|
2
|
-
import { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
1
|
+
import type { DomainEntity } from 'domain-objects';
|
|
2
|
+
import type { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
3
3
|
/**
|
|
4
4
|
* .what = extracts resources from a plan's changes
|
|
5
5
|
* .why = needed for replanning during applyChanges
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DomainEntity } from 'domain-objects';
|
|
2
|
-
import { DeclastructDao } from '../../domain.objects/DeclastructDao';
|
|
3
|
-
import { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
1
|
+
import type { DomainEntity } from 'domain-objects';
|
|
2
|
+
import type { DeclastructDao } from '../../domain.objects/DeclastructDao';
|
|
3
|
+
import type { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
4
4
|
/**
|
|
5
5
|
* .what = gets the DAO and provider context for a given resource from available providers
|
|
6
6
|
* .why = enables automatic routing of operations to the correct provider with proper context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDisplayableDiff.js","sourceRoot":"","sources":["../../../src/domain.operations/plan/getDisplayableDiff.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"getDisplayableDiff.js","sourceRoot":"","sources":["../../../src/domain.operations/plan/getDisplayableDiff.ts"],"names":[],"mappings":";;;AAAA,mDAA4E;AAC5E,yCAAiC;AAEjC;;;;GAIG;AACI,MAAM,kBAAkB,GAAG,CAAC,EACjC,IAAI,EACJ,IAAI,GAIL,EAAiB,EAAE;IAClB,2BAA2B;IAC3B,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEhD,4DAA4D;IAC5D,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACnC,MAAM,cAAc,GAAG,IAAA,0BAAS,EAAC,IAAA,6BAAY,EAAC,IAAI,CAAC,CAAC,CAAC;QACrD,MAAM,cAAc,GAAG,IAAA,0BAAS,EAAC,IAAA,6BAAY,EAAC,IAAI,CAAC,CAAC,CAAC;QACrD,IAAI,cAAc,KAAK,cAAc;YAAE,OAAO,IAAI,CAAC;IACrD,CAAC;IAED,4BAA4B;IAC5B,MAAM,mBAAmB,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAA,6BAAY,EAAC,IAAI,CAAC,CAAC;IACpE,MAAM,mBAAmB,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAA,6BAAY,EAAC,IAAI,CAAC,CAAC;IAEpE,6DAA6D;IAC7D,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAElD,6DAA6D;IAC7D,MAAM,UAAU,GAAG,IAAA,gBAAI,EAAC,mBAAmB,EAAE,mBAAmB,EAAE;QAChE,WAAW,EAAE,QAAQ;QACrB,WAAW,EAAE,SAAS;QACtB,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACpB,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjC,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC3E,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AApCW,QAAA,kBAAkB,sBAoC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeclastructChange } from '../../domain.objects/DeclastructChange';
|
|
1
|
+
import type { DeclastructChange } from '../../domain.objects/DeclastructChange';
|
|
2
2
|
/**
|
|
3
3
|
* .what = computes deterministic hash of changes
|
|
4
4
|
* .why = enables plan comparison and staleness detection
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type DomainEntity } from 'domain-objects';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { ContextLogTrail } from 'simple-log-methods';
|
|
3
|
+
import type { ContextDeclastruct } from '../../domain.objects/ContextDeclastruct';
|
|
4
4
|
import { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
5
|
-
import {
|
|
5
|
+
import type { DeclastructProvider } from '../../domain.objects/DeclastructProvider';
|
|
6
6
|
/**
|
|
7
7
|
* .what = generates a plan of changes required to achieve desired state
|
|
8
8
|
* .why = enables users to review infrastructure changes before applying them
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
1
|
+
import type { DeclastructPlan } from '../../domain.objects/DeclastructPlan';
|
|
2
2
|
/**
|
|
3
3
|
* .what = validates that a plan hasn't become stale
|
|
4
4
|
* .why = prevents applying outdated changes to infrastructure
|
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.4.
|
|
5
|
+
"version": "1.4.1",
|
|
6
6
|
"repository": "ehmpathy/declastruct",
|
|
7
7
|
"homepage": "https://github.com/ehmpathy/declastruct",
|
|
8
8
|
"keywords": [
|
|
@@ -28,19 +28,20 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build:ts": "tsc -p ./tsconfig.build.json",
|
|
30
30
|
"commit:with-cli": "npx cz",
|
|
31
|
-
"fix:format:
|
|
32
|
-
"fix:format": "npm run fix:format:
|
|
33
|
-
"fix:lint": "
|
|
31
|
+
"fix:format:biome": "biome check --write src",
|
|
32
|
+
"fix:format": "npm run fix:format:biome",
|
|
33
|
+
"fix:lint": "biome check --write src",
|
|
34
34
|
"build:clean": "rm dist/ -rf",
|
|
35
35
|
"build:compile": "tsc -p ./tsconfig.build.json",
|
|
36
36
|
"build": "npm run build:clean && npm run build:compile",
|
|
37
37
|
"test:commits": "LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose",
|
|
38
|
-
"test:types": "tsc -p ./tsconfig.
|
|
39
|
-
"test:format
|
|
40
|
-
"test:format": "npm run test:format:prettier",
|
|
38
|
+
"test:types": "tsc -p ./tsconfig.json --noEmit",
|
|
39
|
+
"test:format": "npm run test:format:biome",
|
|
41
40
|
"test:lint:deps": "npx depcheck -c ./.depcheckrc.yml",
|
|
42
|
-
"test:
|
|
43
|
-
"test:lint": "
|
|
41
|
+
"test:format:biome": "biome format src",
|
|
42
|
+
"test:lint:biome": "biome check src --diagnostic-level=error",
|
|
43
|
+
"test:lint:biome:all": "biome check src",
|
|
44
|
+
"test:lint": "npm run test:lint:biome && npm run test:lint:deps",
|
|
44
45
|
"test:unit": "jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
45
46
|
"test:integration": "jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')",
|
|
46
47
|
"test:acceptance:locally": "npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"bottleneck": "2.19.5",
|
|
58
59
|
"chalk": "5.4.1",
|
|
59
60
|
"commander": "14.0.2",
|
|
61
|
+
"domain-objects": "0.31.3",
|
|
60
62
|
"helpful-errors": "1.5.3",
|
|
61
63
|
"jest-diff": "30.0.2",
|
|
62
64
|
"simple-log-methods": "0.6.2",
|
|
@@ -68,37 +70,27 @@
|
|
|
68
70
|
"domain-objects": "0.31.0"
|
|
69
71
|
},
|
|
70
72
|
"devDependencies": {
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
73
|
-
"@commitlint/
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@tsconfig/
|
|
77
|
-
"@
|
|
73
|
+
"@biomejs/biome": "2.3.8",
|
|
74
|
+
"@commitlint/cli": "19.5.0",
|
|
75
|
+
"@commitlint/config-conventional": "19.5.0",
|
|
76
|
+
"@swc/core": "1.15.3",
|
|
77
|
+
"@swc/jest": "0.2.39",
|
|
78
|
+
"@tsconfig/node20": "20.1.5",
|
|
79
|
+
"@tsconfig/strictest": "2.0.5",
|
|
80
|
+
"@types/jest": "30.0.0",
|
|
78
81
|
"@types/node": "22.15.29",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
80
|
-
"@typescript-eslint/parser": "7.8.0",
|
|
81
|
-
"babel-jest": "30.2.0",
|
|
82
|
-
"core-js": "3.26.1",
|
|
83
82
|
"cz-conventional-changelog": "3.3.0",
|
|
84
|
-
"declapract": "0.12.3",
|
|
85
|
-
"declapract-typescript-ehmpathy": "0.
|
|
86
|
-
"declastruct": "1.
|
|
87
|
-
"declastruct-github": "1.0.3",
|
|
83
|
+
"declapract": "^0.12.3",
|
|
84
|
+
"declapract-typescript-ehmpathy": "^0.43.7",
|
|
85
|
+
"declastruct": "^1.4.0",
|
|
86
|
+
"declastruct-github": "^1.0.3",
|
|
88
87
|
"depcheck": "1.4.3",
|
|
89
|
-
"
|
|
90
|
-
"eslint-config-airbnb-typescript": "18.0.0",
|
|
91
|
-
"eslint-config-prettier": "8.5.0",
|
|
92
|
-
"eslint-plugin-import": "2.26.0",
|
|
93
|
-
"eslint-plugin-prettier": "4.2.1",
|
|
94
|
-
"eslint-plugin-unused-imports": "4.1.4",
|
|
88
|
+
"esbuild-register": "3.6.0",
|
|
95
89
|
"husky": "8.0.3",
|
|
96
|
-
"jest": "
|
|
97
|
-
"prettier": "2.8.1",
|
|
90
|
+
"jest": "30.2.0",
|
|
98
91
|
"rhachet": "1.12.1",
|
|
99
92
|
"rhachet-roles-ehmpathy": "1.9.1",
|
|
100
93
|
"test-fns": "1.7.2",
|
|
101
|
-
"ts-jest": "29.4.5",
|
|
102
94
|
"tsx": "4.20.6",
|
|
103
95
|
"typescript": "5.4.5"
|
|
104
96
|
},
|