@pipelab/plugin-minify 1.0.0-beta.14 → 1.0.0-beta.16
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/index.cjs +159 -88
- package/dist/index.mjs +124 -53
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -3927,6 +3927,56 @@ function literal(literal_, message) {
|
|
|
3927
3927
|
}
|
|
3928
3928
|
};
|
|
3929
3929
|
}
|
|
3930
|
+
function looseObject(entries, message) {
|
|
3931
|
+
return {
|
|
3932
|
+
kind: "schema",
|
|
3933
|
+
type: "loose_object",
|
|
3934
|
+
reference: looseObject,
|
|
3935
|
+
expects: "Object",
|
|
3936
|
+
async: false,
|
|
3937
|
+
entries,
|
|
3938
|
+
message,
|
|
3939
|
+
_run(dataset, config2) {
|
|
3940
|
+
const input = dataset.value;
|
|
3941
|
+
if (input && typeof input === "object") {
|
|
3942
|
+
dataset.typed = true;
|
|
3943
|
+
dataset.value = {};
|
|
3944
|
+
for (const key in this.entries) {
|
|
3945
|
+
const value2 = input[key];
|
|
3946
|
+
const valueDataset = this.entries[key]._run({
|
|
3947
|
+
typed: false,
|
|
3948
|
+
value: value2
|
|
3949
|
+
}, config2);
|
|
3950
|
+
if (valueDataset.issues) {
|
|
3951
|
+
const pathItem = {
|
|
3952
|
+
type: "object",
|
|
3953
|
+
origin: "value",
|
|
3954
|
+
input,
|
|
3955
|
+
key,
|
|
3956
|
+
value: value2
|
|
3957
|
+
};
|
|
3958
|
+
for (const issue of valueDataset.issues) {
|
|
3959
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
3960
|
+
else issue.path = [pathItem];
|
|
3961
|
+
dataset.issues?.push(issue);
|
|
3962
|
+
}
|
|
3963
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
3964
|
+
if (config2.abortEarly) {
|
|
3965
|
+
dataset.typed = false;
|
|
3966
|
+
break;
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
3970
|
+
if (valueDataset.value !== void 0 || key in input) dataset.value[key] = valueDataset.value;
|
|
3971
|
+
}
|
|
3972
|
+
if (!dataset.issues || !config2.abortEarly) {
|
|
3973
|
+
for (const key in input) if (_isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
|
|
3974
|
+
}
|
|
3975
|
+
} else _addIssue(this, "type", dataset, config2);
|
|
3976
|
+
return dataset;
|
|
3977
|
+
}
|
|
3978
|
+
};
|
|
3979
|
+
}
|
|
3930
3980
|
function number(message) {
|
|
3931
3981
|
return {
|
|
3932
3982
|
kind: "schema",
|
|
@@ -4464,6 +4514,18 @@ settingsMigratorInternal.createMigrations({
|
|
|
4464
4514
|
})
|
|
4465
4515
|
]
|
|
4466
4516
|
});
|
|
4517
|
+
const connectionsMigratorInternal = createMigrator();
|
|
4518
|
+
const defaultConnections = connectionsMigratorInternal.createDefault({
|
|
4519
|
+
version: "1.0.0",
|
|
4520
|
+
connections: []
|
|
4521
|
+
});
|
|
4522
|
+
connectionsMigratorInternal.createMigrations({
|
|
4523
|
+
defaultValue: defaultConnections,
|
|
4524
|
+
migrations: [createMigration({
|
|
4525
|
+
version: "1.0.0",
|
|
4526
|
+
up: finalVersion
|
|
4527
|
+
})]
|
|
4528
|
+
});
|
|
4467
4529
|
const fileRepoMigratorInternal = createMigrator();
|
|
4468
4530
|
const defaultFileRepo = fileRepoMigratorInternal.createDefault({
|
|
4469
4531
|
version: "2.0.0",
|
|
@@ -4625,11 +4687,51 @@ const LEGACY_ID_MAP = {
|
|
|
4625
4687
|
};
|
|
4626
4688
|
const getStrictPluginId = (pluginId) => {
|
|
4627
4689
|
if (!pluginId) return pluginId;
|
|
4628
|
-
|
|
4629
|
-
if (pluginId.startsWith("@") || pluginId.includes("/") || pluginId.startsWith("pipelab-plugin-")) return pluginId;
|
|
4630
|
-
const prefixed = `@pipelab/plugin-${pluginId}`;
|
|
4631
|
-
return LEGACY_ID_MAP[prefixed] || prefixed;
|
|
4690
|
+
return LEGACY_ID_MAP[pluginId] || pluginId;
|
|
4632
4691
|
};
|
|
4692
|
+
//#endregion
|
|
4693
|
+
//#region ../../packages/shared/src/save-location.ts
|
|
4694
|
+
const SaveLocationInternalValidator = object({
|
|
4695
|
+
id: string(),
|
|
4696
|
+
project: string(),
|
|
4697
|
+
lastModified: string(),
|
|
4698
|
+
type: literal("internal"),
|
|
4699
|
+
configName: string()
|
|
4700
|
+
});
|
|
4701
|
+
const SaveLocationValidator = union([
|
|
4702
|
+
object({
|
|
4703
|
+
id: string(),
|
|
4704
|
+
project: string(),
|
|
4705
|
+
path: string(),
|
|
4706
|
+
lastModified: string(),
|
|
4707
|
+
type: literal("external"),
|
|
4708
|
+
summary: object({
|
|
4709
|
+
plugins: array(string()),
|
|
4710
|
+
name: string(),
|
|
4711
|
+
description: string()
|
|
4712
|
+
})
|
|
4713
|
+
}),
|
|
4714
|
+
SaveLocationInternalValidator,
|
|
4715
|
+
object({
|
|
4716
|
+
id: string(),
|
|
4717
|
+
project: string(),
|
|
4718
|
+
type: literal("pipelab-cloud")
|
|
4719
|
+
})
|
|
4720
|
+
]);
|
|
4721
|
+
object({
|
|
4722
|
+
version: literal("1.0.0"),
|
|
4723
|
+
data: optional(record(string(), SaveLocationValidator), {})
|
|
4724
|
+
});
|
|
4725
|
+
const FileRepoProjectValidatorV2$1 = object({
|
|
4726
|
+
id: string(),
|
|
4727
|
+
name: string(),
|
|
4728
|
+
description: string()
|
|
4729
|
+
});
|
|
4730
|
+
object({
|
|
4731
|
+
version: literal("2.0.0"),
|
|
4732
|
+
projects: array(FileRepoProjectValidatorV2$1),
|
|
4733
|
+
pipelines: optional(array(SaveLocationValidator), [])
|
|
4734
|
+
});
|
|
4633
4735
|
object({
|
|
4634
4736
|
cacheFolder: string(),
|
|
4635
4737
|
theme: union([literal("light"), literal("dark")]),
|
|
@@ -4781,6 +4883,17 @@ object({
|
|
|
4781
4883
|
})),
|
|
4782
4884
|
isInternalMigrationBannerClosed: optional(boolean(), false)
|
|
4783
4885
|
});
|
|
4886
|
+
const ConnectionValidator = looseObject({
|
|
4887
|
+
id: string(),
|
|
4888
|
+
pluginName: string(),
|
|
4889
|
+
name: string(),
|
|
4890
|
+
createdAt: string(),
|
|
4891
|
+
isDefault: boolean()
|
|
4892
|
+
});
|
|
4893
|
+
object({
|
|
4894
|
+
version: literal("1.0.0"),
|
|
4895
|
+
connections: array(ConnectionValidator)
|
|
4896
|
+
});
|
|
4784
4897
|
//#endregion
|
|
4785
4898
|
//#region ../../node_modules/tslog/dist/esm/prettyLogStyles.js
|
|
4786
4899
|
const prettyLogStyles = {
|
|
@@ -5301,7 +5414,7 @@ const useLogger = () => {
|
|
|
5301
5414
|
const OriginValidator = object({
|
|
5302
5415
|
pluginId: string(),
|
|
5303
5416
|
nodeId: string(),
|
|
5304
|
-
version: pipe(
|
|
5417
|
+
version: optional(pipe(string(), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent.")))
|
|
5305
5418
|
});
|
|
5306
5419
|
const BlockActionValidatorV1 = object({
|
|
5307
5420
|
type: literal("action"),
|
|
@@ -5314,7 +5427,7 @@ const EditorParamValidatorV3 = union([literal("simple"), literal("editor")]);
|
|
|
5314
5427
|
const BlockActionValidatorV3 = object({
|
|
5315
5428
|
type: literal("action"),
|
|
5316
5429
|
uid: string(),
|
|
5317
|
-
name: pipe(
|
|
5430
|
+
name: optional(pipe(string(), description("A custom name provided by the user"))),
|
|
5318
5431
|
disabled: optional(boolean()),
|
|
5319
5432
|
params: record(string(), object({
|
|
5320
5433
|
editor: EditorParamValidatorV3,
|
|
@@ -47604,35 +47717,6 @@ const createPathParam = (value, definition) => {
|
|
|
47604
47717
|
};
|
|
47605
47718
|
};
|
|
47606
47719
|
//#endregion
|
|
47607
|
-
//#region ../../packages/shared/src/save-location.ts
|
|
47608
|
-
const SaveLocationInternalValidator = object({
|
|
47609
|
-
id: string(),
|
|
47610
|
-
project: string(),
|
|
47611
|
-
lastModified: string(),
|
|
47612
|
-
type: literal("internal"),
|
|
47613
|
-
configName: string()
|
|
47614
|
-
});
|
|
47615
|
-
const SaveLocationValidator = union([
|
|
47616
|
-
object({
|
|
47617
|
-
id: string(),
|
|
47618
|
-
project: string(),
|
|
47619
|
-
path: string(),
|
|
47620
|
-
lastModified: string(),
|
|
47621
|
-
type: literal("external"),
|
|
47622
|
-
summary: object({
|
|
47623
|
-
plugins: array(string()),
|
|
47624
|
-
name: string(),
|
|
47625
|
-
description: string()
|
|
47626
|
-
})
|
|
47627
|
-
}),
|
|
47628
|
-
SaveLocationInternalValidator,
|
|
47629
|
-
object({
|
|
47630
|
-
id: string(),
|
|
47631
|
-
project: string(),
|
|
47632
|
-
type: literal("pipelab-cloud")
|
|
47633
|
-
})
|
|
47634
|
-
]);
|
|
47635
|
-
//#endregion
|
|
47636
47720
|
//#region ../../packages/shared/src/websocket.types.ts
|
|
47637
47721
|
var WebSocketError = class extends Error {
|
|
47638
47722
|
constructor(message, code, requestId) {
|
|
@@ -47649,20 +47733,6 @@ object({
|
|
|
47649
47733
|
version: literal("1.0.0"),
|
|
47650
47734
|
data: optional(record(string(), SaveLocationValidator), {})
|
|
47651
47735
|
});
|
|
47652
|
-
const FileRepoProjectValidatorV2$1 = object({
|
|
47653
|
-
id: string(),
|
|
47654
|
-
name: string(),
|
|
47655
|
-
description: string()
|
|
47656
|
-
});
|
|
47657
|
-
object({
|
|
47658
|
-
version: literal("2.0.0"),
|
|
47659
|
-
projects: array(FileRepoProjectValidatorV2$1),
|
|
47660
|
-
pipelines: optional(array(SaveLocationValidator), [])
|
|
47661
|
-
});
|
|
47662
|
-
object({
|
|
47663
|
-
version: literal("1.0.0"),
|
|
47664
|
-
data: optional(record(string(), SaveLocationValidator), {})
|
|
47665
|
-
});
|
|
47666
47736
|
const FileRepoProjectValidatorV2 = object({
|
|
47667
47737
|
id: string(),
|
|
47668
47738
|
name: string(),
|
|
@@ -47674,9 +47744,13 @@ object({
|
|
|
47674
47744
|
pipelines: optional(array(SaveLocationValidator), [])
|
|
47675
47745
|
});
|
|
47676
47746
|
//#endregion
|
|
47747
|
+
//#region ../../packages/constants/src/index.ts
|
|
47748
|
+
const websocketPort = 33753;
|
|
47749
|
+
//#endregion
|
|
47677
47750
|
//#region ../../packages/core-node/src/context.ts
|
|
47678
47751
|
init_esm_shims();
|
|
47679
|
-
const
|
|
47752
|
+
const metaUrl = typeof import.meta !== "undefined" ? import.meta.url : void 0;
|
|
47753
|
+
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? dirname(fileURLToPath(metaUrl)) : process.cwd();
|
|
47680
47754
|
const isDev = process.env.NODE_ENV === "development";
|
|
47681
47755
|
/**
|
|
47682
47756
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
@@ -51248,9 +51322,6 @@ const useAPI = () => {
|
|
|
51248
51322
|
};
|
|
51249
51323
|
};
|
|
51250
51324
|
//#endregion
|
|
51251
|
-
//#region ../../packages/constants/src/index.ts
|
|
51252
|
-
const websocketPort = 33753;
|
|
51253
|
-
//#endregion
|
|
51254
51325
|
//#region ../../packages/core-node/src/websocket-server.ts
|
|
51255
51326
|
var WebSocketServer = class {
|
|
51256
51327
|
wss = null;
|