@antelopejs/core 1.23.3 → 1.24.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/cli/commands/module/create-module.js +35 -0
- package/dist/cli/commands/module/create-module.js.map +1 -1
- package/dist/cli/commands/project/build-action.js +2 -6
- package/dist/cli/commands/project/build-action.js.map +1 -1
- package/dist/cli/commands/project/modules/index.js +4 -2
- package/dist/cli/commands/project/modules/index.js.map +1 -1
- package/dist/cli/commands/project/modules/module-locks.d.ts +2 -1
- package/dist/cli/commands/project/modules/module-locks.js +14 -2
- package/dist/cli/commands/project/modules/module-locks.js.map +1 -1
- package/dist/cli/commands/project/modules/release-leases-action.d.ts +9 -0
- package/dist/cli/commands/project/modules/release-leases-action.js +84 -0
- package/dist/cli/commands/project/modules/release-leases-action.js.map +1 -0
- package/dist/cli/commands/project/modules/release-leases.d.ts +3 -0
- package/dist/cli/commands/project/modules/release-leases.js +61 -0
- package/dist/cli/commands/project/modules/release-leases.js.map +1 -0
- package/dist/cli/commands/project/modules/update-action.js +21 -3
- package/dist/cli/commands/project/modules/update-action.js.map +1 -1
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +5 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/core/build/index.js +7 -2
- package/dist/core/build/index.js.map +1 -1
- package/dist/core/downloaders/git.js +88 -22
- package/dist/core/downloaders/git.js.map +1 -1
- package/dist/core/downloaders/package-locks.d.ts +1 -0
- package/dist/core/downloaders/package-locks.js +3 -0
- package/dist/core/downloaders/package-locks.js.map +1 -1
- package/dist/core/downloaders/package.js +61 -43
- package/dist/core/downloaders/package.js.map +1 -1
- package/dist/core/downloaders/utils.d.ts +5 -0
- package/dist/core/downloaders/utils.js +44 -0
- package/dist/core/downloaders/utils.js.map +1 -1
- package/dist/core/modules/build-artifact.d.ts +1 -0
- package/dist/core/modules/build-artifact.js +30 -3
- package/dist/core/modules/build-artifact.js.map +1 -1
- package/dist/core/modules/cache-leases.d.ts +46 -0
- package/dist/core/modules/cache-leases.js +305 -0
- package/dist/core/modules/cache-leases.js.map +1 -0
- package/dist/core/modules/cache-lock.d.ts +16 -0
- package/dist/core/modules/cache-lock.js +279 -0
- package/dist/core/modules/cache-lock.js.map +1 -0
- package/dist/core/modules/cache-manifest.d.ts +19 -0
- package/dist/core/modules/cache-manifest.js +141 -0
- package/dist/core/modules/cache-manifest.js.map +1 -0
- package/dist/core/modules/index.d.ts +2 -0
- package/dist/core/modules/index.js +4 -1
- package/dist/core/modules/index.js.map +1 -1
- package/dist/core/modules/interface-registry.d.ts +1 -1
- package/dist/core/modules/interface-registry.js +2 -4
- package/dist/core/modules/interface-registry.js.map +1 -1
- package/dist/core/modules/module-cache.d.ts +26 -2
- package/dist/core/modules/module-cache.js +246 -28
- package/dist/core/modules/module-cache.js.map +1 -1
- package/dist/core/modules/module-manager-bindings.d.ts +2 -2
- package/dist/core/modules/module-manager-bindings.js +25 -20
- package/dist/core/modules/module-manager-bindings.js.map +1 -1
- package/dist/core/modules/module-manager-context.d.ts +2 -3
- package/dist/core/modules/module-manager-context.js +0 -3
- package/dist/core/modules/module-manager-context.js.map +1 -1
- package/dist/core/modules/module-manager.d.ts +0 -1
- package/dist/core/modules/module-manager.js +0 -2
- package/dist/core/modules/module-manager.js.map +1 -1
- package/dist/core/modules/resolver.js +3 -1
- package/dist/core/modules/resolver.js.map +1 -1
- package/dist/core/output/package-manager.js +21 -5
- package/dist/core/output/package-manager.js.map +1 -1
- package/dist/core/resolution/binding-diagnostics.d.ts +1 -0
- package/dist/core/resolution/binding-diagnostics.js +4 -0
- package/dist/core/resolution/binding-diagnostics.js.map +1 -1
- package/dist/core/resolution/binding-graph-instances.d.ts +14 -0
- package/dist/core/resolution/binding-graph-instances.js +85 -0
- package/dist/core/resolution/binding-graph-instances.js.map +1 -0
- package/dist/core/resolution/binding-graph-types.d.ts +2 -0
- package/dist/core/resolution/binding-graph.js +32 -28
- package/dist/core/resolution/binding-graph.js.map +1 -1
- package/dist/core/resolution/binding-providers.js +5 -1
- package/dist/core/resolution/binding-providers.js.map +1 -1
- package/dist/core/runtime/build-refresh.d.ts +5 -1
- package/dist/core/runtime/build-refresh.js +22 -5
- package/dist/core/runtime/build-refresh.js.map +1 -1
- package/dist/core/runtime/cache-pruning.d.ts +4 -0
- package/dist/core/runtime/cache-pruning.js +123 -0
- package/dist/core/runtime/cache-pruning.js.map +1 -0
- package/dist/core/runtime/dev-server-registry.js +1 -14
- package/dist/core/runtime/dev-server-registry.js.map +1 -1
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +1 -0
- package/dist/core/runtime/index.js.map +1 -1
- package/dist/core/runtime/launch-sequence.js +54 -10
- package/dist/core/runtime/launch-sequence.js.map +1 -1
- package/dist/core/runtime/watch/missing-folders.js +1 -1
- package/dist/core/runtime/watch/missing-folders.js.map +1 -1
- package/dist/utils/environment.d.ts +1 -0
- package/dist/utils/environment.js +9 -0
- package/dist/utils/environment.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/process.d.ts +1 -0
- package/dist/utils/process.js +17 -0
- package/dist/utils/process.js.map +1 -0
- package/package.json +1 -1
- package/skills/ajs-cli/SKILL.md +2 -1
package/dist/utils/index.js
CHANGED
|
@@ -14,10 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./environment"), exports);
|
|
17
18
|
__exportStar(require("./field-checks"), exports);
|
|
18
19
|
__exportStar(require("./json"), exports);
|
|
19
20
|
__exportStar(require("./object"), exports);
|
|
20
21
|
__exportStar(require("./package-resolution"), exports);
|
|
22
|
+
__exportStar(require("./process"), exports);
|
|
21
23
|
__exportStar(require("./promise"), exports);
|
|
22
24
|
__exportStar(require("./type-guards"), exports);
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,4CAA0B;AAC1B,gDAA8B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,iDAA+B;AAC/B,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,4CAA0B;AAC1B,4CAA0B;AAC1B,gDAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isProcessAlive(pid: number): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isProcessAlive = isProcessAlive;
|
|
4
|
+
const PERMISSION_DENIED_CODE = "EPERM";
|
|
5
|
+
function isProcessAlive(pid) {
|
|
6
|
+
try {
|
|
7
|
+
process.kill(pid, 0);
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
if (!(error instanceof Error))
|
|
12
|
+
throw error;
|
|
13
|
+
const systemError = error;
|
|
14
|
+
return systemError.code === PERMISSION_DENIED_CODE;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=process.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/utils/process.ts"],"names":[],"mappings":";;AAMA,wCASC;AAfD,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAMvC,SAAgB,cAAc,CAAC,GAAW;IACxC,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;YAAE,MAAM,KAAK,CAAC;QAC3C,MAAM,WAAW,GAA0B,KAAK,CAAC;QACjD,OAAO,WAAW,CAAC,IAAI,KAAK,sBAAsB,CAAC;IACrD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.1",
|
|
4
4
|
"description": "TypeScript framework extending hexagonal architecture across your application and its ecosystem through explicit contracts and replaceable modules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
package/skills/ajs-cli/SKILL.md
CHANGED
|
@@ -33,6 +33,7 @@ ajs project modules add <modules...> # add & download modules you name (-m,
|
|
|
33
33
|
ajs project modules remove <modules...> # remove from config (alias: rm; -f, --force)
|
|
34
34
|
ajs project modules update [modules...] # bump npm modules to their latest versions, resolve their locks again, check interface versions (--dry-run, --fix)
|
|
35
35
|
ajs project modules install # add a provider module for every unresolved interface, then check interface versions (-y: never ask, --fix)
|
|
36
|
+
ajs project modules release-leases # list the cache leases, delete those of exited runs of this host (--foreign: also other hosts/containers, asks; -y without a terminal)
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
`add` in package mode accepts `<name>@<exact|range|dist-tag>`; without a spec it writes a caret range of the latest version. `add` does no interface resolution.
|
|
@@ -43,7 +44,7 @@ ajs project modules install # add a provider module for every unres
|
|
|
43
44
|
|
|
44
45
|
`modules install` and `modules update` find, for each interface package, the highest installed copy every module's range accepts. When the copy a launch would share is older, they fail (exit `1`) with `Interface packages need a newer copy` and the exact change: a raised floor in a local module's `package.json` (`^0.1.8 → ^0.1.9`), or an npm module whose dependencies must be resolved again (`modules update <module>`). `--fix` applies the changes, reinstalls and checks again. A local module that only compiles against an older copy gets a warning. For an interface nothing implements, the shared copy is that highest accepted copy, whatever the module order. `build`, `start` and `dev` fail with `Incompatible interface package resolution` when a module's declared range excludes the shared copy; run `modules install` to get the exact change, or update the module. Do not skip the build check. A module marked `optional: true` that would conflict only produces a warning, as `start` runs without it.
|
|
45
46
|
|
|
46
|
-
Modules declared in `antelope.config.ts` are downloaded into `.antelope/cache` by `dev`, `build`, and `modules add`; a module's own npm dependencies install inside its cache folder.
|
|
47
|
+
Modules declared in `antelope.config.ts` are downloaded into `.antelope/cache` by `dev`, `build`, and `modules add`; a module's own npm dependencies install inside its cache folder. Once loaded, `dev` and `build` remove every cached module that no live run's lease (`.antelope/cache/.leases/`), the project's `build.json` or a build pin (`.antelope/cache/.builds/`) points at. `ANTELOPEJS_NO_CACHE_PRUNE=1` turns that removal off. A run waits while another downloads the same version (`.antelope/cache/.downloads/`), then reuses it; `modules update` and an `ignoreCache` source keep a complete folder that another live run uses instead of replacing it. While a lease from another host or container is present nothing is pruned, and the warning names every such lease; once those runs are gone, delete their leases with `modules release-leases --foreign`.
|
|
47
48
|
|
|
48
49
|
**Module locks.** The lockfile an npm module's package manager writes in its cache folder is recorded in `antelope-lock/<package>@<version>/` (`pnpm-lock.yaml`, `package-lock.json` or `yarn.lock`), and replayed on every later install, so the same commit installs the same dependency versions on every machine and every day. Commit `antelope-lock/` with `antelope.config.ts`. A locked range (`^1.0.0`) stays on its recorded version. Only `modules update` resolves the dependencies again (and drops the locks no environment uses, as `modules remove` does): that is how a dependency fix reaches the project, and its diff is the review. In CI and image builds run `ajs project build --frozen-modules` (env `ANTELOPEJS_FROZEN_MODULES`): it installs only from the locks and fails on an npm module without one. Git and local modules carry their own lockfiles and are not locked here.
|
|
49
50
|
|