@powerlines/plugin-content-collections 0.1.46 → 0.1.47
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/helpers/create-writer.d.cts +4 -1
- package/dist/helpers/create-writer.d.ts +4 -1
- package/dist/helpers/index.d.cts +4 -1
- package/dist/helpers/index.d.ts +4 -1
- package/dist/{index-b8FiWaqe.d.cts → index-CXiZtTmb.d.cts} +75 -5
- package/dist/{index-b8FiWaqe.d.ts → index-CXiZtTmb.d.ts} +75 -5
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/types/index.d.cts +4 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/plugin.d.cts +4 -1
- package/dist/types/plugin.d.ts +4 -1
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Writer } from '@content-collections/core';
|
|
2
|
-
import { C as ContentCollectionsPluginContext } from '../index-
|
|
2
|
+
import { C as ContentCollectionsPluginContext } from '../index-CXiZtTmb.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Writer } from '@content-collections/core';
|
|
2
|
-
import { C as ContentCollectionsPluginContext } from '../index-
|
|
2
|
+
import { C as ContentCollectionsPluginContext } from '../index-CXiZtTmb.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
package/dist/helpers/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createEmitter } from './create-emitter.cjs';
|
|
2
2
|
export { createWriter } from './create-writer.cjs';
|
|
3
3
|
import '@content-collections/core';
|
|
4
|
-
import '../index-
|
|
4
|
+
import '../index-CXiZtTmb.cjs';
|
|
5
5
|
import '@storm-software/build-tools/types';
|
|
6
6
|
import '@storm-software/config-tools/types';
|
|
7
7
|
import '@storm-software/config/types';
|
|
@@ -10,11 +10,14 @@ import '@stryke/types/configuration';
|
|
|
10
10
|
import '@stryke/types/file';
|
|
11
11
|
import 'vite';
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/http/fetch';
|
|
13
14
|
import '@stryke/types/package-json';
|
|
14
15
|
import 'jiti';
|
|
15
16
|
import 'magic-string';
|
|
17
|
+
import 'oxc-parser';
|
|
16
18
|
import 'semver';
|
|
17
19
|
import 'ts-morph';
|
|
20
|
+
import 'undici';
|
|
18
21
|
import 'unplugin';
|
|
19
22
|
import '@stryke/fs/resolve';
|
|
20
23
|
import '@stryke/types/tsconfig';
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createEmitter } from './create-emitter.js';
|
|
2
2
|
export { createWriter } from './create-writer.js';
|
|
3
3
|
import '@content-collections/core';
|
|
4
|
-
import '../index-
|
|
4
|
+
import '../index-CXiZtTmb.js';
|
|
5
5
|
import '@storm-software/build-tools/types';
|
|
6
6
|
import '@storm-software/config-tools/types';
|
|
7
7
|
import '@storm-software/config/types';
|
|
@@ -10,11 +10,14 @@ import '@stryke/types/configuration';
|
|
|
10
10
|
import '@stryke/types/file';
|
|
11
11
|
import 'vite';
|
|
12
12
|
import '@stryke/env/get-env-paths';
|
|
13
|
+
import '@stryke/http/fetch';
|
|
13
14
|
import '@stryke/types/package-json';
|
|
14
15
|
import 'jiti';
|
|
15
16
|
import 'magic-string';
|
|
17
|
+
import 'oxc-parser';
|
|
16
18
|
import 'semver';
|
|
17
19
|
import 'ts-morph';
|
|
20
|
+
import 'undici';
|
|
18
21
|
import 'unplugin';
|
|
19
22
|
import '@stryke/fs/resolve';
|
|
20
23
|
import '@stryke/types/tsconfig';
|
|
@@ -7,11 +7,14 @@ import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configura
|
|
|
7
7
|
import { AssetGlob } from '@stryke/types/file';
|
|
8
8
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
9
9
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
10
|
+
import { FetchRequestOptions } from '@stryke/http/fetch';
|
|
10
11
|
import { PackageJson } from '@stryke/types/package-json';
|
|
11
12
|
import { Jiti } from 'jiti';
|
|
12
13
|
import { SourceMap } from 'magic-string';
|
|
14
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
13
15
|
import { Range } from 'semver';
|
|
14
16
|
import { Project } from 'ts-morph';
|
|
17
|
+
import { RequestInfo, Response } from 'undici';
|
|
15
18
|
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
16
19
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
17
20
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
@@ -617,6 +620,22 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
|
|
|
617
620
|
*/
|
|
618
621
|
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
619
622
|
type ProjectType = "application" | "library";
|
|
623
|
+
interface DeployConfig {
|
|
624
|
+
/**
|
|
625
|
+
* The deployment variant being used by the Powerlines engine.
|
|
626
|
+
*
|
|
627
|
+
* @example
|
|
628
|
+
* ```ts
|
|
629
|
+
* export default defineConfig({
|
|
630
|
+
* deploy: {
|
|
631
|
+
* variant: "cloudflare"
|
|
632
|
+
* }
|
|
633
|
+
* });
|
|
634
|
+
*
|
|
635
|
+
* ```
|
|
636
|
+
*/
|
|
637
|
+
variant?: string;
|
|
638
|
+
}
|
|
620
639
|
interface OutputConfig {
|
|
621
640
|
/**
|
|
622
641
|
* The path to output the final compiled files to
|
|
@@ -739,7 +758,7 @@ interface BaseConfig {
|
|
|
739
758
|
* @remarks
|
|
740
759
|
* If set to `false`, the deployment will be disabled.
|
|
741
760
|
*/
|
|
742
|
-
deploy?:
|
|
761
|
+
deploy?: DeployConfig | false;
|
|
743
762
|
/**
|
|
744
763
|
* The path to the tsconfig file to be used by the compiler
|
|
745
764
|
*
|
|
@@ -866,7 +885,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
866
885
|
*/
|
|
867
886
|
framework?: string;
|
|
868
887
|
}
|
|
869
|
-
|
|
888
|
+
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
870
889
|
/**
|
|
871
890
|
* Configuration provided to build processes
|
|
872
891
|
*
|
|
@@ -886,7 +905,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
|
|
|
886
905
|
*/
|
|
887
906
|
override?: Partial<TBuildResolvedConfig>;
|
|
888
907
|
};
|
|
889
|
-
}
|
|
908
|
+
}
|
|
890
909
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
891
910
|
/**
|
|
892
911
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -925,7 +944,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
|
|
|
925
944
|
/**
|
|
926
945
|
* The resolved options for the Powerlines project configuration.
|
|
927
946
|
*/
|
|
928
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
|
|
947
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
|
|
929
948
|
/**
|
|
930
949
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
931
950
|
*/
|
|
@@ -1012,6 +1031,18 @@ interface InitContextOptions {
|
|
|
1012
1031
|
*/
|
|
1013
1032
|
isHighPriority: boolean;
|
|
1014
1033
|
}
|
|
1034
|
+
interface FetchOptions extends FetchRequestOptions {
|
|
1035
|
+
/**
|
|
1036
|
+
* An indicator specifying that the request should bypass any caching
|
|
1037
|
+
*/
|
|
1038
|
+
skipCache?: boolean;
|
|
1039
|
+
}
|
|
1040
|
+
interface ParseOptions extends ParserOptions {
|
|
1041
|
+
/**
|
|
1042
|
+
* When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
|
|
1043
|
+
*/
|
|
1044
|
+
allowReturnOutsideFunction?: boolean;
|
|
1045
|
+
}
|
|
1015
1046
|
/**
|
|
1016
1047
|
* The unresolved Powerlines context.
|
|
1017
1048
|
*
|
|
@@ -1028,6 +1059,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1028
1059
|
*/
|
|
1029
1060
|
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1030
1061
|
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1062
|
+
sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
|
|
1031
1063
|
output: TResolvedConfig["output"];
|
|
1032
1064
|
};
|
|
1033
1065
|
/**
|
|
@@ -1147,6 +1179,44 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1147
1179
|
* This instance is created lazily on first access.
|
|
1148
1180
|
*/
|
|
1149
1181
|
program: Project;
|
|
1182
|
+
/**
|
|
1183
|
+
* A function to perform HTTP fetch requests
|
|
1184
|
+
*
|
|
1185
|
+
* @remarks
|
|
1186
|
+
* This function uses a caching layer to avoid duplicate requests during the Powerlines process.
|
|
1187
|
+
*
|
|
1188
|
+
* @example
|
|
1189
|
+
* ```ts
|
|
1190
|
+
* const response = await context.fetch("https://api.example.com/data");
|
|
1191
|
+
* const data = await response.json();
|
|
1192
|
+
* ```
|
|
1193
|
+
*
|
|
1194
|
+
* @see https://github.com/nodejs/undici
|
|
1195
|
+
*
|
|
1196
|
+
* @param input - The URL to fetch.
|
|
1197
|
+
* @param options - The fetch request options.
|
|
1198
|
+
* @returns A promise that resolves to a response returned by the fetch.
|
|
1199
|
+
*/
|
|
1200
|
+
fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1203
|
+
*
|
|
1204
|
+
* @remarks
|
|
1205
|
+
* This function can be used to parse TypeScript code into an AST for further analysis or transformation.
|
|
1206
|
+
*
|
|
1207
|
+
* @example
|
|
1208
|
+
* ```ts
|
|
1209
|
+
* const ast = context.parse("const x: number = 42;");
|
|
1210
|
+
* ```
|
|
1211
|
+
*
|
|
1212
|
+
* @see https://rollupjs.org/plugin-development/#this-parse
|
|
1213
|
+
* @see https://github.com/oxc/oxc
|
|
1214
|
+
*
|
|
1215
|
+
* @param code - The source code to parse.
|
|
1216
|
+
* @param options - The options to pass to the parser.
|
|
1217
|
+
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1218
|
+
*/
|
|
1219
|
+
parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
|
|
1150
1220
|
/**
|
|
1151
1221
|
* A helper function to resolve modules using the Jiti resolver
|
|
1152
1222
|
*
|
|
@@ -1246,7 +1316,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1246
1316
|
*/
|
|
1247
1317
|
logger: LogFn;
|
|
1248
1318
|
}
|
|
1249
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =
|
|
1319
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
1250
1320
|
|
|
1251
1321
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1252
1322
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
@@ -7,11 +7,14 @@ import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configura
|
|
|
7
7
|
import { AssetGlob } from '@stryke/types/file';
|
|
8
8
|
import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
|
|
9
9
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
10
|
+
import { FetchRequestOptions } from '@stryke/http/fetch';
|
|
10
11
|
import { PackageJson } from '@stryke/types/package-json';
|
|
11
12
|
import { Jiti } from 'jiti';
|
|
12
13
|
import { SourceMap } from 'magic-string';
|
|
14
|
+
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
13
15
|
import { Range } from 'semver';
|
|
14
16
|
import { Project } from 'ts-morph';
|
|
17
|
+
import { RequestInfo, Response } from 'undici';
|
|
15
18
|
import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
|
|
16
19
|
import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
|
|
17
20
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
@@ -617,6 +620,22 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
|
|
|
617
620
|
*/
|
|
618
621
|
type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
|
|
619
622
|
type ProjectType = "application" | "library";
|
|
623
|
+
interface DeployConfig {
|
|
624
|
+
/**
|
|
625
|
+
* The deployment variant being used by the Powerlines engine.
|
|
626
|
+
*
|
|
627
|
+
* @example
|
|
628
|
+
* ```ts
|
|
629
|
+
* export default defineConfig({
|
|
630
|
+
* deploy: {
|
|
631
|
+
* variant: "cloudflare"
|
|
632
|
+
* }
|
|
633
|
+
* });
|
|
634
|
+
*
|
|
635
|
+
* ```
|
|
636
|
+
*/
|
|
637
|
+
variant?: string;
|
|
638
|
+
}
|
|
620
639
|
interface OutputConfig {
|
|
621
640
|
/**
|
|
622
641
|
* The path to output the final compiled files to
|
|
@@ -739,7 +758,7 @@ interface BaseConfig {
|
|
|
739
758
|
* @remarks
|
|
740
759
|
* If set to `false`, the deployment will be disabled.
|
|
741
760
|
*/
|
|
742
|
-
deploy?:
|
|
761
|
+
deploy?: DeployConfig | false;
|
|
743
762
|
/**
|
|
744
763
|
* The path to the tsconfig file to be used by the compiler
|
|
745
764
|
*
|
|
@@ -866,7 +885,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
866
885
|
*/
|
|
867
886
|
framework?: string;
|
|
868
887
|
}
|
|
869
|
-
|
|
888
|
+
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
870
889
|
/**
|
|
871
890
|
* Configuration provided to build processes
|
|
872
891
|
*
|
|
@@ -886,7 +905,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
|
|
|
886
905
|
*/
|
|
887
906
|
override?: Partial<TBuildResolvedConfig>;
|
|
888
907
|
};
|
|
889
|
-
}
|
|
908
|
+
}
|
|
890
909
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
891
910
|
/**
|
|
892
911
|
* The configuration provided while executing Powerlines commands.
|
|
@@ -925,7 +944,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
|
|
|
925
944
|
/**
|
|
926
945
|
* The resolved options for the Powerlines project configuration.
|
|
927
946
|
*/
|
|
928
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
|
|
947
|
+
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
|
|
929
948
|
/**
|
|
930
949
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
931
950
|
*/
|
|
@@ -1012,6 +1031,18 @@ interface InitContextOptions {
|
|
|
1012
1031
|
*/
|
|
1013
1032
|
isHighPriority: boolean;
|
|
1014
1033
|
}
|
|
1034
|
+
interface FetchOptions extends FetchRequestOptions {
|
|
1035
|
+
/**
|
|
1036
|
+
* An indicator specifying that the request should bypass any caching
|
|
1037
|
+
*/
|
|
1038
|
+
skipCache?: boolean;
|
|
1039
|
+
}
|
|
1040
|
+
interface ParseOptions extends ParserOptions {
|
|
1041
|
+
/**
|
|
1042
|
+
* When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
|
|
1043
|
+
*/
|
|
1044
|
+
allowReturnOutsideFunction?: boolean;
|
|
1045
|
+
}
|
|
1015
1046
|
/**
|
|
1016
1047
|
* The unresolved Powerlines context.
|
|
1017
1048
|
*
|
|
@@ -1028,6 +1059,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1028
1059
|
*/
|
|
1029
1060
|
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1030
1061
|
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1062
|
+
sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
|
|
1031
1063
|
output: TResolvedConfig["output"];
|
|
1032
1064
|
};
|
|
1033
1065
|
/**
|
|
@@ -1147,6 +1179,44 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1147
1179
|
* This instance is created lazily on first access.
|
|
1148
1180
|
*/
|
|
1149
1181
|
program: Project;
|
|
1182
|
+
/**
|
|
1183
|
+
* A function to perform HTTP fetch requests
|
|
1184
|
+
*
|
|
1185
|
+
* @remarks
|
|
1186
|
+
* This function uses a caching layer to avoid duplicate requests during the Powerlines process.
|
|
1187
|
+
*
|
|
1188
|
+
* @example
|
|
1189
|
+
* ```ts
|
|
1190
|
+
* const response = await context.fetch("https://api.example.com/data");
|
|
1191
|
+
* const data = await response.json();
|
|
1192
|
+
* ```
|
|
1193
|
+
*
|
|
1194
|
+
* @see https://github.com/nodejs/undici
|
|
1195
|
+
*
|
|
1196
|
+
* @param input - The URL to fetch.
|
|
1197
|
+
* @param options - The fetch request options.
|
|
1198
|
+
* @returns A promise that resolves to a response returned by the fetch.
|
|
1199
|
+
*/
|
|
1200
|
+
fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1203
|
+
*
|
|
1204
|
+
* @remarks
|
|
1205
|
+
* This function can be used to parse TypeScript code into an AST for further analysis or transformation.
|
|
1206
|
+
*
|
|
1207
|
+
* @example
|
|
1208
|
+
* ```ts
|
|
1209
|
+
* const ast = context.parse("const x: number = 42;");
|
|
1210
|
+
* ```
|
|
1211
|
+
*
|
|
1212
|
+
* @see https://rollupjs.org/plugin-development/#this-parse
|
|
1213
|
+
* @see https://github.com/oxc/oxc
|
|
1214
|
+
*
|
|
1215
|
+
* @param code - The source code to parse.
|
|
1216
|
+
* @param options - The options to pass to the parser.
|
|
1217
|
+
* @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
|
|
1218
|
+
*/
|
|
1219
|
+
parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
|
|
1150
1220
|
/**
|
|
1151
1221
|
* A helper function to resolve modules using the Jiti resolver
|
|
1152
1222
|
*
|
|
@@ -1246,7 +1316,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1246
1316
|
*/
|
|
1247
1317
|
logger: LogFn;
|
|
1248
1318
|
}
|
|
1249
|
-
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> =
|
|
1319
|
+
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
1250
1320
|
|
|
1251
1321
|
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1252
1322
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, P as Plugin } from './index-
|
|
2
|
-
export { b as ContentCollectionsContext, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from './index-
|
|
1
|
+
import { C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, P as Plugin } from './index-CXiZtTmb.cjs';
|
|
2
|
+
export { b as ContentCollectionsContext, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from './index-CXiZtTmb.cjs';
|
|
3
3
|
export { createEmitter } from './helpers/create-emitter.cjs';
|
|
4
4
|
export { createWriter } from './helpers/create-writer.cjs';
|
|
5
5
|
import '@content-collections/core';
|
|
@@ -11,11 +11,14 @@ import '@stryke/types/configuration';
|
|
|
11
11
|
import '@stryke/types/file';
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@stryke/env/get-env-paths';
|
|
14
|
+
import '@stryke/http/fetch';
|
|
14
15
|
import '@stryke/types/package-json';
|
|
15
16
|
import 'jiti';
|
|
16
17
|
import 'magic-string';
|
|
18
|
+
import 'oxc-parser';
|
|
17
19
|
import 'semver';
|
|
18
20
|
import 'ts-morph';
|
|
21
|
+
import 'undici';
|
|
19
22
|
import 'unplugin';
|
|
20
23
|
import '@stryke/fs/resolve';
|
|
21
24
|
import '@stryke/types/tsconfig';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, P as Plugin } from './index-
|
|
2
|
-
export { b as ContentCollectionsContext, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from './index-
|
|
1
|
+
import { C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, P as Plugin } from './index-CXiZtTmb.js';
|
|
2
|
+
export { b as ContentCollectionsContext, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from './index-CXiZtTmb.js';
|
|
3
3
|
export { createEmitter } from './helpers/create-emitter.js';
|
|
4
4
|
export { createWriter } from './helpers/create-writer.js';
|
|
5
5
|
import '@content-collections/core';
|
|
@@ -11,11 +11,14 @@ import '@stryke/types/configuration';
|
|
|
11
11
|
import '@stryke/types/file';
|
|
12
12
|
import 'vite';
|
|
13
13
|
import '@stryke/env/get-env-paths';
|
|
14
|
+
import '@stryke/http/fetch';
|
|
14
15
|
import '@stryke/types/package-json';
|
|
15
16
|
import 'jiti';
|
|
16
17
|
import 'magic-string';
|
|
18
|
+
import 'oxc-parser';
|
|
17
19
|
import 'semver';
|
|
18
20
|
import 'ts-morph';
|
|
21
|
+
import 'undici';
|
|
19
22
|
import 'unplugin';
|
|
20
23
|
import '@stryke/fs/resolve';
|
|
21
24
|
import '@stryke/types/tsconfig';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-
|
|
1
|
+
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-CXiZtTmb.cjs';
|
|
2
2
|
import '@content-collections/core';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-
|
|
1
|
+
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-CXiZtTmb.js';
|
|
2
2
|
import '@content-collections/core';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@content-collections/core';
|
|
2
|
-
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-
|
|
2
|
+
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-CXiZtTmb.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@content-collections/core';
|
|
2
|
-
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-
|
|
2
|
+
export { b as ContentCollectionsContext, C as ContentCollectionsPluginContext, a as ContentCollectionsPluginOptions, d as ContentCollectionsPluginResolvedConfig, c as ContentCollectionsPluginUserConfig, _ as __ΩContentCollectionsContext, h as __ΩContentCollectionsPluginContext, e as __ΩContentCollectionsPluginOptions, g as __ΩContentCollectionsPluginResolvedConfig, f as __ΩContentCollectionsPluginUserConfig } from '../index-CXiZtTmb.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
|
@@ -8,11 +8,14 @@ import '@stryke/types/configuration';
|
|
|
8
8
|
import '@stryke/types/file';
|
|
9
9
|
import 'vite';
|
|
10
10
|
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/http/fetch';
|
|
11
12
|
import '@stryke/types/package-json';
|
|
12
13
|
import 'jiti';
|
|
13
14
|
import 'magic-string';
|
|
15
|
+
import 'oxc-parser';
|
|
14
16
|
import 'semver';
|
|
15
17
|
import 'ts-morph';
|
|
18
|
+
import 'undici';
|
|
16
19
|
import 'unplugin';
|
|
17
20
|
import '@stryke/fs/resolve';
|
|
18
21
|
import '@stryke/types/tsconfig';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-content-collections",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code using Content Collections.",
|
|
6
6
|
"repository": {
|
|
@@ -105,22 +105,22 @@
|
|
|
105
105
|
],
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@content-collections/core": "^0.12.0",
|
|
108
|
-
"@stryke/fs": "^0.33.
|
|
109
|
-
"@stryke/string-format": "^0.12.
|
|
110
|
-
"@stryke/path": "^0.21.
|
|
111
|
-
"@stryke/type-checks": "^0.3
|
|
112
|
-
"@stryke/types": "^0.10.
|
|
108
|
+
"@stryke/fs": "^0.33.8",
|
|
109
|
+
"@stryke/string-format": "^0.12.12",
|
|
110
|
+
"@stryke/path": "^0.21.6",
|
|
111
|
+
"@stryke/type-checks": "^0.4.3",
|
|
112
|
+
"@stryke/types": "^0.10.12",
|
|
113
113
|
"defu": "^6.1.4",
|
|
114
114
|
"pluralize": "^8.0.0",
|
|
115
|
-
"powerlines": "^0.
|
|
115
|
+
"powerlines": "^0.28.0"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
|
-
"@powerlines/nx": "^0.10.
|
|
119
|
-
"@powerlines/plugin-plugin": "^0.11.
|
|
118
|
+
"@powerlines/nx": "^0.10.47",
|
|
119
|
+
"@powerlines/plugin-plugin": "^0.11.55",
|
|
120
120
|
"@standard-schema/spec": "^1.0.0",
|
|
121
121
|
"@types/node": "^24.10.1",
|
|
122
122
|
"@types/pluralize": "^0.0.33"
|
|
123
123
|
},
|
|
124
124
|
"publishConfig": { "access": "public" },
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "3feaa815e117c46d827eee84c3521e54670abb9b"
|
|
126
126
|
}
|