@awsless/awsless 0.0.564 → 0.0.566
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/app.json +1 -1
- package/dist/bin.js +22 -15
- package/dist/build-json-schema.js +12 -11
- package/dist/prebuild/icon/HASH +1 -1
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/prebuild.js +7 -2
- package/dist/stack.json +1 -1
- package/package.json +12 -11
package/dist/bin.js
CHANGED
|
@@ -869,7 +869,8 @@ var LayersSchema = z14.string().array().describe(
|
|
|
869
869
|
var FileCodeSchema = z14.object({
|
|
870
870
|
file: LocalFileSchema.describe("The file path of the function code."),
|
|
871
871
|
minify: MinifySchema.optional().default(true),
|
|
872
|
-
external: z14.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`)
|
|
872
|
+
external: z14.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`),
|
|
873
|
+
importAsString: z14.string().array().optional().describe(`A list of glob patterns, which specifies the files that should be imported as string.`)
|
|
873
874
|
});
|
|
874
875
|
var BundleCodeSchema = z14.object({
|
|
875
876
|
bundle: LocalDirectorySchema.describe("The directory that needs to be bundled.")
|
|
@@ -1836,8 +1837,8 @@ var IconsSchema = z36.record(
|
|
|
1836
1837
|
subDomain: z36.string().optional(),
|
|
1837
1838
|
log: LogSchema.optional(),
|
|
1838
1839
|
cacheDuration: DurationSchema.optional().describe("The cache duration of the cached icons."),
|
|
1839
|
-
|
|
1840
|
-
symbols: z36.boolean().optional().default(false).describe(
|
|
1840
|
+
preserveIds: z36.boolean().optional().default(false).describe("Preserve the IDs of the icons."),
|
|
1841
|
+
symbols: z36.boolean().optional().default(false).describe(`Convert the SVG's to SVG symbols.`),
|
|
1841
1842
|
origin: z36.union([
|
|
1842
1843
|
z36.object({
|
|
1843
1844
|
static: staticOriginSchema,
|
|
@@ -1846,11 +1847,11 @@ var IconsSchema = z36.record(
|
|
|
1846
1847
|
z36.object({
|
|
1847
1848
|
static: staticOriginSchema.optional(),
|
|
1848
1849
|
function: functionOriginSchema
|
|
1849
|
-
}),
|
|
1850
|
-
z36.object({
|
|
1851
|
-
static: staticOriginSchema,
|
|
1852
|
-
function: functionOriginSchema
|
|
1853
1850
|
})
|
|
1851
|
+
// z.object({
|
|
1852
|
+
// static: staticOriginSchema,
|
|
1853
|
+
// function: functionOriginSchema,
|
|
1854
|
+
// }),
|
|
1854
1855
|
]).describe(
|
|
1855
1856
|
"Image transformation will be applied from a base image. Base images orginates from a local directory that will be uploaded to S3 or from a lambda function."
|
|
1856
1857
|
),
|
|
@@ -1913,11 +1914,11 @@ var ImagesSchema = z37.record(
|
|
|
1913
1914
|
z37.object({
|
|
1914
1915
|
static: staticOriginSchema2.optional(),
|
|
1915
1916
|
function: functionOriginSchema2
|
|
1916
|
-
}),
|
|
1917
|
-
z37.object({
|
|
1918
|
-
static: staticOriginSchema2,
|
|
1919
|
-
function: functionOriginSchema2
|
|
1920
1917
|
})
|
|
1918
|
+
// z.object({
|
|
1919
|
+
// static: staticOriginSchema,
|
|
1920
|
+
// function: functionOriginSchema,
|
|
1921
|
+
// }),
|
|
1921
1922
|
]).describe(
|
|
1922
1923
|
"Specify the origin of your images. Image transformation will be applied from a base image. Base images can be loaded from a S3 bucket (that is synced from a local directory) or dynamicly from a lambda function."
|
|
1923
1924
|
),
|
|
@@ -2957,13 +2958,15 @@ import { createHash } from "crypto";
|
|
|
2957
2958
|
import { dirname as dirname5 } from "path";
|
|
2958
2959
|
import { rollup } from "rollup";
|
|
2959
2960
|
import natives from "rollup-plugin-natives";
|
|
2961
|
+
import { importAsString } from "rollup-plugin-string-import";
|
|
2960
2962
|
import { swc, minify as swcMinify } from "rollup-plugin-swc3";
|
|
2961
2963
|
var bundleTypeScript = async ({
|
|
2962
2964
|
format: format2 = "esm",
|
|
2963
2965
|
minify = true,
|
|
2964
2966
|
file,
|
|
2965
2967
|
nativeDir,
|
|
2966
|
-
external
|
|
2968
|
+
external,
|
|
2969
|
+
importAsString: importAsStringList
|
|
2967
2970
|
}) => {
|
|
2968
2971
|
const bundle = await rollup({
|
|
2969
2972
|
input: file,
|
|
@@ -3000,7 +3003,10 @@ var bundleTypeScript = async ({
|
|
|
3000
3003
|
sourceMap: true,
|
|
3001
3004
|
compress: true
|
|
3002
3005
|
}) : void 0,
|
|
3003
|
-
json()
|
|
3006
|
+
json(),
|
|
3007
|
+
importAsStringList ? importAsString({
|
|
3008
|
+
include: importAsStringList
|
|
3009
|
+
}) : void 0
|
|
3004
3010
|
]
|
|
3005
3011
|
});
|
|
3006
3012
|
const ext = format2 === "esm" ? "mjs" : "js";
|
|
@@ -3197,7 +3203,8 @@ var createLambdaFunction = (parentGroup, ctx, ns, id, local) => {
|
|
|
3197
3203
|
...(props.layers ?? []).flatMap((id2) => ctx.shared.entry("layer", `packages`, id2))
|
|
3198
3204
|
],
|
|
3199
3205
|
minify: fileCode.minify,
|
|
3200
|
-
nativeDir: temp.path
|
|
3206
|
+
nativeDir: temp.path,
|
|
3207
|
+
importAsString: fileCode.importAsString
|
|
3201
3208
|
});
|
|
3202
3209
|
const nativeFiles = await temp.files();
|
|
3203
3210
|
const archive = await zipFiles([
|
|
@@ -6738,7 +6745,7 @@ var iconFeature = defineFeature({
|
|
|
6738
6745
|
serverLambda.setEnvironment(
|
|
6739
6746
|
"ICON_CONFIG",
|
|
6740
6747
|
JSON.stringify({
|
|
6741
|
-
|
|
6748
|
+
preserveIds: props.preserveIds,
|
|
6742
6749
|
symbols: props.symbols
|
|
6743
6750
|
})
|
|
6744
6751
|
);
|
|
@@ -261,7 +261,8 @@ var LayersSchema = z11.string().array().describe(
|
|
|
261
261
|
var FileCodeSchema = z11.object({
|
|
262
262
|
file: LocalFileSchema.describe("The file path of the function code."),
|
|
263
263
|
minify: MinifySchema.optional().default(true),
|
|
264
|
-
external: z11.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`)
|
|
264
|
+
external: z11.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`),
|
|
265
|
+
importAsString: z11.string().array().optional().describe(`A list of glob patterns, which specifies the files that should be imported as string.`)
|
|
265
266
|
});
|
|
266
267
|
var BundleCodeSchema = z11.object({
|
|
267
268
|
bundle: LocalDirectorySchema.describe("The directory that needs to be bundled.")
|
|
@@ -1228,8 +1229,8 @@ var IconsSchema = z33.record(
|
|
|
1228
1229
|
subDomain: z33.string().optional(),
|
|
1229
1230
|
log: LogSchema.optional(),
|
|
1230
1231
|
cacheDuration: DurationSchema.optional().describe("The cache duration of the cached icons."),
|
|
1231
|
-
|
|
1232
|
-
symbols: z33.boolean().optional().default(false).describe(
|
|
1232
|
+
preserveIds: z33.boolean().optional().default(false).describe("Preserve the IDs of the icons."),
|
|
1233
|
+
symbols: z33.boolean().optional().default(false).describe(`Convert the SVG's to SVG symbols.`),
|
|
1233
1234
|
origin: z33.union([
|
|
1234
1235
|
z33.object({
|
|
1235
1236
|
static: staticOriginSchema,
|
|
@@ -1238,11 +1239,11 @@ var IconsSchema = z33.record(
|
|
|
1238
1239
|
z33.object({
|
|
1239
1240
|
static: staticOriginSchema.optional(),
|
|
1240
1241
|
function: functionOriginSchema
|
|
1241
|
-
}),
|
|
1242
|
-
z33.object({
|
|
1243
|
-
static: staticOriginSchema,
|
|
1244
|
-
function: functionOriginSchema
|
|
1245
1242
|
})
|
|
1243
|
+
// z.object({
|
|
1244
|
+
// static: staticOriginSchema,
|
|
1245
|
+
// function: functionOriginSchema,
|
|
1246
|
+
// }),
|
|
1246
1247
|
]).describe(
|
|
1247
1248
|
"Image transformation will be applied from a base image. Base images orginates from a local directory that will be uploaded to S3 or from a lambda function."
|
|
1248
1249
|
),
|
|
@@ -1305,11 +1306,11 @@ var ImagesSchema = z34.record(
|
|
|
1305
1306
|
z34.object({
|
|
1306
1307
|
static: staticOriginSchema2.optional(),
|
|
1307
1308
|
function: functionOriginSchema2
|
|
1308
|
-
}),
|
|
1309
|
-
z34.object({
|
|
1310
|
-
static: staticOriginSchema2,
|
|
1311
|
-
function: functionOriginSchema2
|
|
1312
1309
|
})
|
|
1310
|
+
// z.object({
|
|
1311
|
+
// static: staticOriginSchema,
|
|
1312
|
+
// function: functionOriginSchema,
|
|
1313
|
+
// }),
|
|
1313
1314
|
]).describe(
|
|
1314
1315
|
"Specify the origin of your images. Image transformation will be applied from a base image. Base images can be loaded from a S3 bucket (that is synced from a local directory) or dynamicly from a lambda function."
|
|
1315
1316
|
),
|
package/dist/prebuild/icon/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bf14739b5ca124417f0ee222ff390af92dda02fa
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/prebuild.js
CHANGED
|
@@ -19,6 +19,7 @@ import { createHash } from "crypto";
|
|
|
19
19
|
import { dirname } from "path";
|
|
20
20
|
import { rollup } from "rollup";
|
|
21
21
|
import natives from "rollup-plugin-natives";
|
|
22
|
+
import { importAsString } from "rollup-plugin-string-import";
|
|
22
23
|
import { swc, minify as swcMinify } from "rollup-plugin-swc3";
|
|
23
24
|
|
|
24
25
|
// src/cli/ui/style.ts
|
|
@@ -56,7 +57,8 @@ var bundleTypeScript = async ({
|
|
|
56
57
|
minify = true,
|
|
57
58
|
file,
|
|
58
59
|
nativeDir,
|
|
59
|
-
external
|
|
60
|
+
external,
|
|
61
|
+
importAsString: importAsStringList
|
|
60
62
|
}) => {
|
|
61
63
|
const bundle = await rollup({
|
|
62
64
|
input: file,
|
|
@@ -93,7 +95,10 @@ var bundleTypeScript = async ({
|
|
|
93
95
|
sourceMap: true,
|
|
94
96
|
compress: true
|
|
95
97
|
}) : void 0,
|
|
96
|
-
json()
|
|
98
|
+
json(),
|
|
99
|
+
importAsStringList ? importAsString({
|
|
100
|
+
include: importAsStringList
|
|
101
|
+
}) : void 0
|
|
97
102
|
]
|
|
98
103
|
});
|
|
99
104
|
const ext = format === "esm" ? "mjs" : "js";
|