@deepseek-ai/cordis-plugin-include 1.0.5-rc.1 → 1.0.6
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/lib/index.js +2 -15
- package/lib/types/index.d.ts +2 -8
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +7 -15
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntryGroup, EntryTree, isJsExpr } from "@deepseek-ai/cordis-plugin-loader";
|
|
2
2
|
import { Service } from "@deepseek-ai/cordis";
|
|
3
3
|
import { extname } from "node:path";
|
|
4
4
|
import { access, constants, readFile, rename, writeFile } from "node:fs/promises";
|
|
@@ -116,20 +116,7 @@ var ConfigFileError = class extends Error {
|
|
|
116
116
|
var Include = class extends EntryTree {
|
|
117
117
|
config;
|
|
118
118
|
static inject = ["loader"];
|
|
119
|
-
|
|
120
|
-
* Resolve Include's own options while preserving nested entry expressions.
|
|
121
|
-
* @param ctx - the Include plugin context.
|
|
122
|
-
* @param config - the raw Include config.
|
|
123
|
-
* @returns resolved Include options with `initial` and `patches` untouched.
|
|
124
|
-
*/
|
|
125
|
-
static [EntryConfigResolver](ctx, config) {
|
|
126
|
-
const { initial, patches, ...own } = config;
|
|
127
|
-
return {
|
|
128
|
-
...interpolate(ctx, own),
|
|
129
|
-
...initial === void 0 ? {} : { initial },
|
|
130
|
-
...patches === void 0 ? {} : { patches }
|
|
131
|
-
};
|
|
132
|
-
}
|
|
119
|
+
static [EntryGroup.key] = true;
|
|
133
120
|
filename;
|
|
134
121
|
type;
|
|
135
122
|
readonly;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntryGroup, EntryTree, type EntryOptions } from '@deepseek-ai/cordis-plugin-loader';
|
|
2
2
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
3
3
|
import * as yaml from 'js-yaml';
|
|
4
4
|
/**
|
|
@@ -55,13 +55,7 @@ export declare namespace Include {
|
|
|
55
55
|
export declare class Include extends EntryTree {
|
|
56
56
|
config: Include.Config;
|
|
57
57
|
static inject: string[];
|
|
58
|
-
|
|
59
|
-
* Resolve Include's own options while preserving nested entry expressions.
|
|
60
|
-
* @param ctx - the Include plugin context.
|
|
61
|
-
* @param config - the raw Include config.
|
|
62
|
-
* @returns resolved Include options with `initial` and `patches` untouched.
|
|
63
|
-
*/
|
|
64
|
-
static [EntryConfigResolver](ctx: Context, config: Include.Config): Include.Config;
|
|
58
|
+
static readonly [EntryGroup.key] = true;
|
|
65
59
|
filename: string;
|
|
66
60
|
private type?;
|
|
67
61
|
private readonly;
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAY,KAAK,YAAY,EAAE,MAAM,mCAAmC,CAAA;AACtG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKtD,OAAO,KAAK,IAAI,MAAM,SAAS,CAAA;AAU/B;;;;;GAKG;AACH,eAAO,MAAM,eAAe,aAAkC,CAAA;AAoB9D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,YAAY,EAAE,EACpB,OAAO,EAAE,YAAY,EAAE,GAAG,SAAS,EACnC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAC9C,YAAY,EAAE,CAkEhB;AAgBD,4EAA4E;AAC5E,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,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;;;;;;OAQG;IACH,OAAO,CAAC,OAAO;YAMD,WAAW;YASX,IAAI;IA2BlB,OAAO,CAAC,YAAY;IAMb,CAAC,OAAO,CAAC,IAAI,CAAC;IAkBf,IAAI;IAKV;;;;OAIG;IACG,OAAO;IAUb,OAAO,CAAC,KAAK;YAIC,MAAM;YAQN,UAAU;IAqBxB,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,UAAU;IAkBlB,uDAAuD;IACvD,KAAK;CAIN;AAED,eAAe,OAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/cordis-plugin-include",
|
|
3
3
|
"description": "Include files in cordis configurations",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.6",
|
|
5
5
|
"publishConfig": {
|
|
6
|
-
"access": "
|
|
6
|
+
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"author": "Shigma <shigma10826@gmail.com>",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@deepseek-ai/cordis-plugin-loader": "^1.0.
|
|
34
|
-
"@deepseek-ai/cordis": "^4.0.1
|
|
33
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.2",
|
|
34
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"js-yaml": "^4.1.0",
|
|
38
|
-
"@deepseek-ai/cosmokit": "^1.8.2
|
|
38
|
+
"@deepseek-ai/cosmokit": "^1.8.2"
|
|
39
39
|
}
|
|
40
40
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntryGroup, EntryTree, isJsExpr, type EntryOptions } from '@deepseek-ai/cordis-plugin-loader'
|
|
2
2
|
import { Context, Service } from '@deepseek-ai/cordis'
|
|
3
3
|
import { extname } from 'node:path'
|
|
4
4
|
import { access, constants, readFile, rename, writeFile } from 'node:fs/promises'
|
|
@@ -174,20 +174,12 @@ export namespace Include {
|
|
|
174
174
|
export class Include extends EntryTree {
|
|
175
175
|
static inject = ['loader']
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
static [EntryConfigResolver](ctx: Context, config: Include.Config): Include.Config {
|
|
184
|
-
const { initial, patches, ...own } = config
|
|
185
|
-
return {
|
|
186
|
-
...interpolate(ctx, own),
|
|
187
|
-
...(initial === undefined ? {} : { initial }),
|
|
188
|
-
...(patches === undefined ? {} : { patches }),
|
|
189
|
-
}
|
|
190
|
-
}
|
|
177
|
+
// Tree-carrier marker (the Group plugin declares the same): this config is
|
|
178
|
+
// entry and patch lists, so the Loader's `internal/config` interpolation
|
|
179
|
+
// keeps it literal — a `!!js` expression inside a nested row's config
|
|
180
|
+
// belongs to that row's fiber, resolving lazily in the row's own context.
|
|
181
|
+
// Include's own fields (`path`, `enableLogs`) therefore stay literal too.
|
|
182
|
+
static readonly [EntryGroup.key] = true
|
|
191
183
|
|
|
192
184
|
public filename: string
|
|
193
185
|
private type?: string
|