lula2 0.7.0 → 0.7.1-nightly.0
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/README.md +15 -4
- package/dist/_app/immutable/assets/0.CqUz5Ivi.css +1 -0
- package/dist/_app/immutable/chunks/Bjogn1-e.js +1 -0
- package/dist/_app/immutable/chunks/{iYE0hyoB.js → BpJCrXEQ.js} +1 -1
- package/dist/_app/immutable/chunks/Bw8XYye8.js +1 -0
- package/dist/_app/immutable/chunks/{24UDoAn4.js → C9Maxw0c.js} +18 -18
- package/dist/_app/immutable/chunks/CKMdwa-C.js +1 -0
- package/dist/_app/immutable/chunks/CTPWKfKb.js +1 -0
- package/dist/_app/immutable/chunks/DrUO72_y.js +2 -0
- package/dist/_app/immutable/chunks/{CpBmCwmc.js → Dtw5WU4b.js} +1 -1
- package/dist/_app/immutable/chunks/{BNHHvtTX.js → HbK75QZv.js} +1 -1
- package/dist/_app/immutable/chunks/{CttDkklr.js → fK2dsNoX.js} +2 -2
- package/dist/_app/immutable/entry/app.cmkEjIE0.js +2 -0
- package/dist/_app/immutable/entry/start.Bbaig19m.js +1 -0
- package/dist/_app/immutable/nodes/{0.CX00wLgP.js → 0.DodXhO5C.js} +1 -1
- package/dist/_app/immutable/nodes/{1.eWlwSy7C.js → 1.COL0cUB0.js} +1 -1
- package/dist/_app/immutable/nodes/{2.C8hXOpRf.js → 2.DK4JP_er.js} +1 -1
- package/dist/_app/immutable/nodes/{3.DeLiyve3.js → 3.RkjIJ-kR.js} +1 -1
- package/dist/_app/immutable/nodes/{4.CSVxIlBM.js → 4.CxXALkXI.js} +1 -1
- package/dist/_app/version.json +1 -1
- package/dist/cli/commands/crawl.js +30 -13
- package/dist/cli/commands/ui.js +45 -2
- package/dist/cli/server/index.js +45 -2
- package/dist/cli/server/server.js +45 -2
- package/dist/index.html +11 -11
- package/dist/index.js +75 -15
- package/package.json +21 -22
- package/dist/_app/immutable/assets/0.KSamNhnP.css +0 -1
- package/dist/_app/immutable/chunks/B0ygo1VA.js +0 -2
- package/dist/_app/immutable/chunks/B2nEDjq4.js +0 -1
- package/dist/_app/immutable/chunks/P3psI8RV.js +0 -1
- package/dist/_app/immutable/chunks/iLqChAUt.js +0 -1
- package/dist/_app/immutable/chunks/l0xMBaDV.js +0 -1
- package/dist/_app/immutable/entry/app.DK674slU.js +0 -2
- package/dist/_app/immutable/entry/start.BzhV34ug.js +0 -1
package/dist/cli/commands/ui.js
CHANGED
|
@@ -4217,7 +4217,7 @@ import { join as join7 } from "path";
|
|
|
4217
4217
|
import cors from "cors";
|
|
4218
4218
|
import express2 from "express";
|
|
4219
4219
|
|
|
4220
|
-
// node_modules/.pnpm/express-rate-limit@8.
|
|
4220
|
+
// node_modules/.pnpm/express-rate-limit@8.2.1_express@5.1.0/node_modules/express-rate-limit/dist/index.mjs
|
|
4221
4221
|
var import_ip_address = __toESM(require_ip_address(), 1);
|
|
4222
4222
|
import { isIPv6 } from "node:net";
|
|
4223
4223
|
import { isIPv6 as isIPv62 } from "node:net";
|
|
@@ -4687,12 +4687,54 @@ var validations = {
|
|
|
4687
4687
|
);
|
|
4688
4688
|
}
|
|
4689
4689
|
},
|
|
4690
|
+
knownOptions(passedOptions) {
|
|
4691
|
+
if (!passedOptions) return;
|
|
4692
|
+
const optionsMap = {
|
|
4693
|
+
windowMs: true,
|
|
4694
|
+
limit: true,
|
|
4695
|
+
message: true,
|
|
4696
|
+
statusCode: true,
|
|
4697
|
+
legacyHeaders: true,
|
|
4698
|
+
standardHeaders: true,
|
|
4699
|
+
identifier: true,
|
|
4700
|
+
requestPropertyName: true,
|
|
4701
|
+
skipFailedRequests: true,
|
|
4702
|
+
skipSuccessfulRequests: true,
|
|
4703
|
+
keyGenerator: true,
|
|
4704
|
+
ipv6Subnet: true,
|
|
4705
|
+
handler: true,
|
|
4706
|
+
skip: true,
|
|
4707
|
+
requestWasSuccessful: true,
|
|
4708
|
+
store: true,
|
|
4709
|
+
validate: true,
|
|
4710
|
+
headers: true,
|
|
4711
|
+
max: true,
|
|
4712
|
+
passOnStoreError: true
|
|
4713
|
+
};
|
|
4714
|
+
const validOptions = Object.keys(optionsMap).concat(
|
|
4715
|
+
"draft_polli_ratelimit_headers",
|
|
4716
|
+
// not a valid option anymore, but we have a more specific check for this one, so don't warn for it here
|
|
4717
|
+
// from express-slow-down - https://github.com/express-rate-limit/express-slow-down/blob/main/source/types.ts#L65
|
|
4718
|
+
"delayAfter",
|
|
4719
|
+
"delayMs",
|
|
4720
|
+
"maxDelayMs"
|
|
4721
|
+
);
|
|
4722
|
+
for (const key of Object.keys(passedOptions)) {
|
|
4723
|
+
if (!validOptions.includes(key)) {
|
|
4724
|
+
throw new ValidationError(
|
|
4725
|
+
"ERR_ERL_UNKNOWN_OPTION",
|
|
4726
|
+
`Unexpected configuration option: ${key}`
|
|
4727
|
+
// todo: suggest a valid option with a short levenstein distance?
|
|
4728
|
+
);
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4731
|
+
},
|
|
4690
4732
|
/**
|
|
4691
4733
|
* Checks the options.validate setting to ensure that only recognized
|
|
4692
4734
|
* validations are enabled or disabled.
|
|
4693
4735
|
*
|
|
4694
4736
|
* If any unrecognized values are found, an error is logged that
|
|
4695
|
-
* includes the list of supported
|
|
4737
|
+
* includes the list of supported validations.
|
|
4696
4738
|
*/
|
|
4697
4739
|
validationsConfig() {
|
|
4698
4740
|
const supportedValidations = Object.keys(this).filter(
|
|
@@ -4860,6 +4902,7 @@ var parseOptions = (passedOptions) => {
|
|
|
4860
4902
|
const notUndefinedOptions = omitUndefinedProperties(passedOptions);
|
|
4861
4903
|
const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
|
|
4862
4904
|
validations2.validationsConfig();
|
|
4905
|
+
validations2.knownOptions(passedOptions);
|
|
4863
4906
|
validations2.draftPolliHeaders(
|
|
4864
4907
|
// @ts-expect-error see the note above.
|
|
4865
4908
|
notUndefinedOptions.draft_polli_ratelimit_headers
|
package/dist/cli/server/index.js
CHANGED
|
@@ -4194,7 +4194,7 @@ var init_spreadsheetRoutes = __esm({
|
|
|
4194
4194
|
import cors from "cors";
|
|
4195
4195
|
import express2 from "express";
|
|
4196
4196
|
|
|
4197
|
-
// node_modules/.pnpm/express-rate-limit@8.
|
|
4197
|
+
// node_modules/.pnpm/express-rate-limit@8.2.1_express@5.1.0/node_modules/express-rate-limit/dist/index.mjs
|
|
4198
4198
|
var import_ip_address = __toESM(require_ip_address(), 1);
|
|
4199
4199
|
import { isIPv6 } from "node:net";
|
|
4200
4200
|
import { isIPv6 as isIPv62 } from "node:net";
|
|
@@ -4664,12 +4664,54 @@ var validations = {
|
|
|
4664
4664
|
);
|
|
4665
4665
|
}
|
|
4666
4666
|
},
|
|
4667
|
+
knownOptions(passedOptions) {
|
|
4668
|
+
if (!passedOptions) return;
|
|
4669
|
+
const optionsMap = {
|
|
4670
|
+
windowMs: true,
|
|
4671
|
+
limit: true,
|
|
4672
|
+
message: true,
|
|
4673
|
+
statusCode: true,
|
|
4674
|
+
legacyHeaders: true,
|
|
4675
|
+
standardHeaders: true,
|
|
4676
|
+
identifier: true,
|
|
4677
|
+
requestPropertyName: true,
|
|
4678
|
+
skipFailedRequests: true,
|
|
4679
|
+
skipSuccessfulRequests: true,
|
|
4680
|
+
keyGenerator: true,
|
|
4681
|
+
ipv6Subnet: true,
|
|
4682
|
+
handler: true,
|
|
4683
|
+
skip: true,
|
|
4684
|
+
requestWasSuccessful: true,
|
|
4685
|
+
store: true,
|
|
4686
|
+
validate: true,
|
|
4687
|
+
headers: true,
|
|
4688
|
+
max: true,
|
|
4689
|
+
passOnStoreError: true
|
|
4690
|
+
};
|
|
4691
|
+
const validOptions = Object.keys(optionsMap).concat(
|
|
4692
|
+
"draft_polli_ratelimit_headers",
|
|
4693
|
+
// not a valid option anymore, but we have a more specific check for this one, so don't warn for it here
|
|
4694
|
+
// from express-slow-down - https://github.com/express-rate-limit/express-slow-down/blob/main/source/types.ts#L65
|
|
4695
|
+
"delayAfter",
|
|
4696
|
+
"delayMs",
|
|
4697
|
+
"maxDelayMs"
|
|
4698
|
+
);
|
|
4699
|
+
for (const key of Object.keys(passedOptions)) {
|
|
4700
|
+
if (!validOptions.includes(key)) {
|
|
4701
|
+
throw new ValidationError(
|
|
4702
|
+
"ERR_ERL_UNKNOWN_OPTION",
|
|
4703
|
+
`Unexpected configuration option: ${key}`
|
|
4704
|
+
// todo: suggest a valid option with a short levenstein distance?
|
|
4705
|
+
);
|
|
4706
|
+
}
|
|
4707
|
+
}
|
|
4708
|
+
},
|
|
4667
4709
|
/**
|
|
4668
4710
|
* Checks the options.validate setting to ensure that only recognized
|
|
4669
4711
|
* validations are enabled or disabled.
|
|
4670
4712
|
*
|
|
4671
4713
|
* If any unrecognized values are found, an error is logged that
|
|
4672
|
-
* includes the list of supported
|
|
4714
|
+
* includes the list of supported validations.
|
|
4673
4715
|
*/
|
|
4674
4716
|
validationsConfig() {
|
|
4675
4717
|
const supportedValidations = Object.keys(this).filter(
|
|
@@ -4837,6 +4879,7 @@ var parseOptions = (passedOptions) => {
|
|
|
4837
4879
|
const notUndefinedOptions = omitUndefinedProperties(passedOptions);
|
|
4838
4880
|
const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
|
|
4839
4881
|
validations2.validationsConfig();
|
|
4882
|
+
validations2.knownOptions(passedOptions);
|
|
4840
4883
|
validations2.draftPolliHeaders(
|
|
4841
4884
|
// @ts-expect-error see the note above.
|
|
4842
4885
|
notUndefinedOptions.draft_polli_ratelimit_headers
|
|
@@ -4194,7 +4194,7 @@ var init_spreadsheetRoutes = __esm({
|
|
|
4194
4194
|
import cors from "cors";
|
|
4195
4195
|
import express2 from "express";
|
|
4196
4196
|
|
|
4197
|
-
// node_modules/.pnpm/express-rate-limit@8.
|
|
4197
|
+
// node_modules/.pnpm/express-rate-limit@8.2.1_express@5.1.0/node_modules/express-rate-limit/dist/index.mjs
|
|
4198
4198
|
var import_ip_address = __toESM(require_ip_address(), 1);
|
|
4199
4199
|
import { isIPv6 } from "node:net";
|
|
4200
4200
|
import { isIPv6 as isIPv62 } from "node:net";
|
|
@@ -4664,12 +4664,54 @@ var validations = {
|
|
|
4664
4664
|
);
|
|
4665
4665
|
}
|
|
4666
4666
|
},
|
|
4667
|
+
knownOptions(passedOptions) {
|
|
4668
|
+
if (!passedOptions) return;
|
|
4669
|
+
const optionsMap = {
|
|
4670
|
+
windowMs: true,
|
|
4671
|
+
limit: true,
|
|
4672
|
+
message: true,
|
|
4673
|
+
statusCode: true,
|
|
4674
|
+
legacyHeaders: true,
|
|
4675
|
+
standardHeaders: true,
|
|
4676
|
+
identifier: true,
|
|
4677
|
+
requestPropertyName: true,
|
|
4678
|
+
skipFailedRequests: true,
|
|
4679
|
+
skipSuccessfulRequests: true,
|
|
4680
|
+
keyGenerator: true,
|
|
4681
|
+
ipv6Subnet: true,
|
|
4682
|
+
handler: true,
|
|
4683
|
+
skip: true,
|
|
4684
|
+
requestWasSuccessful: true,
|
|
4685
|
+
store: true,
|
|
4686
|
+
validate: true,
|
|
4687
|
+
headers: true,
|
|
4688
|
+
max: true,
|
|
4689
|
+
passOnStoreError: true
|
|
4690
|
+
};
|
|
4691
|
+
const validOptions = Object.keys(optionsMap).concat(
|
|
4692
|
+
"draft_polli_ratelimit_headers",
|
|
4693
|
+
// not a valid option anymore, but we have a more specific check for this one, so don't warn for it here
|
|
4694
|
+
// from express-slow-down - https://github.com/express-rate-limit/express-slow-down/blob/main/source/types.ts#L65
|
|
4695
|
+
"delayAfter",
|
|
4696
|
+
"delayMs",
|
|
4697
|
+
"maxDelayMs"
|
|
4698
|
+
);
|
|
4699
|
+
for (const key of Object.keys(passedOptions)) {
|
|
4700
|
+
if (!validOptions.includes(key)) {
|
|
4701
|
+
throw new ValidationError(
|
|
4702
|
+
"ERR_ERL_UNKNOWN_OPTION",
|
|
4703
|
+
`Unexpected configuration option: ${key}`
|
|
4704
|
+
// todo: suggest a valid option with a short levenstein distance?
|
|
4705
|
+
);
|
|
4706
|
+
}
|
|
4707
|
+
}
|
|
4708
|
+
},
|
|
4667
4709
|
/**
|
|
4668
4710
|
* Checks the options.validate setting to ensure that only recognized
|
|
4669
4711
|
* validations are enabled or disabled.
|
|
4670
4712
|
*
|
|
4671
4713
|
* If any unrecognized values are found, an error is logged that
|
|
4672
|
-
* includes the list of supported
|
|
4714
|
+
* includes the list of supported validations.
|
|
4673
4715
|
*/
|
|
4674
4716
|
validationsConfig() {
|
|
4675
4717
|
const supportedValidations = Object.keys(this).filter(
|
|
@@ -4837,6 +4879,7 @@ var parseOptions = (passedOptions) => {
|
|
|
4837
4879
|
const notUndefinedOptions = omitUndefinedProperties(passedOptions);
|
|
4838
4880
|
const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
|
|
4839
4881
|
validations2.validationsConfig();
|
|
4882
|
+
validations2.knownOptions(passedOptions);
|
|
4840
4883
|
validations2.draftPolliHeaders(
|
|
4841
4884
|
// @ts-expect-error see the note above.
|
|
4842
4885
|
notUndefinedOptions.draft_polli_ratelimit_headers
|
package/dist/index.html
CHANGED
|
@@ -6,28 +6,28 @@
|
|
|
6
6
|
<link rel="icon" href="/lula.png" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
8
|
|
|
9
|
-
<link rel="modulepreload" href="/_app/immutable/entry/start.
|
|
10
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
11
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
12
|
-
<link rel="modulepreload" href="/_app/immutable/entry/app.
|
|
13
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
14
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
15
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
16
|
-
<link rel="modulepreload" href="/_app/immutable/chunks/
|
|
9
|
+
<link rel="modulepreload" href="/_app/immutable/entry/start.Bbaig19m.js">
|
|
10
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/Bjogn1-e.js">
|
|
11
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/CKMdwa-C.js">
|
|
12
|
+
<link rel="modulepreload" href="/_app/immutable/entry/app.cmkEjIE0.js">
|
|
13
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/DrUO72_y.js">
|
|
14
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/Dtw5WU4b.js">
|
|
15
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/CTPWKfKb.js">
|
|
16
|
+
<link rel="modulepreload" href="/_app/immutable/chunks/BpJCrXEQ.js">
|
|
17
17
|
</head>
|
|
18
18
|
<body data-sveltekit-preload-data="hover">
|
|
19
19
|
<div style="display: contents">
|
|
20
20
|
<script>
|
|
21
21
|
{
|
|
22
|
-
|
|
22
|
+
__sveltekit_1b0ggpf = {
|
|
23
23
|
base: ""
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const element = document.currentScript.parentElement;
|
|
27
27
|
|
|
28
28
|
Promise.all([
|
|
29
|
-
import("/_app/immutable/entry/start.
|
|
30
|
-
import("/_app/immutable/entry/app.
|
|
29
|
+
import("/_app/immutable/entry/start.Bbaig19m.js"),
|
|
30
|
+
import("/_app/immutable/entry/app.cmkEjIE0.js")
|
|
31
31
|
]).then(([kit, app]) => {
|
|
32
32
|
kit.start(app, element);
|
|
33
33
|
});
|
package/dist/index.js
CHANGED
|
@@ -4221,7 +4221,7 @@ import { join as join7 } from "path";
|
|
|
4221
4221
|
import cors from "cors";
|
|
4222
4222
|
import express2 from "express";
|
|
4223
4223
|
|
|
4224
|
-
// node_modules/.pnpm/express-rate-limit@8.
|
|
4224
|
+
// node_modules/.pnpm/express-rate-limit@8.2.1_express@5.1.0/node_modules/express-rate-limit/dist/index.mjs
|
|
4225
4225
|
var import_ip_address = __toESM(require_ip_address(), 1);
|
|
4226
4226
|
import { isIPv6 } from "node:net";
|
|
4227
4227
|
import { isIPv6 as isIPv62 } from "node:net";
|
|
@@ -4691,12 +4691,54 @@ var validations = {
|
|
|
4691
4691
|
);
|
|
4692
4692
|
}
|
|
4693
4693
|
},
|
|
4694
|
+
knownOptions(passedOptions) {
|
|
4695
|
+
if (!passedOptions) return;
|
|
4696
|
+
const optionsMap = {
|
|
4697
|
+
windowMs: true,
|
|
4698
|
+
limit: true,
|
|
4699
|
+
message: true,
|
|
4700
|
+
statusCode: true,
|
|
4701
|
+
legacyHeaders: true,
|
|
4702
|
+
standardHeaders: true,
|
|
4703
|
+
identifier: true,
|
|
4704
|
+
requestPropertyName: true,
|
|
4705
|
+
skipFailedRequests: true,
|
|
4706
|
+
skipSuccessfulRequests: true,
|
|
4707
|
+
keyGenerator: true,
|
|
4708
|
+
ipv6Subnet: true,
|
|
4709
|
+
handler: true,
|
|
4710
|
+
skip: true,
|
|
4711
|
+
requestWasSuccessful: true,
|
|
4712
|
+
store: true,
|
|
4713
|
+
validate: true,
|
|
4714
|
+
headers: true,
|
|
4715
|
+
max: true,
|
|
4716
|
+
passOnStoreError: true
|
|
4717
|
+
};
|
|
4718
|
+
const validOptions = Object.keys(optionsMap).concat(
|
|
4719
|
+
"draft_polli_ratelimit_headers",
|
|
4720
|
+
// not a valid option anymore, but we have a more specific check for this one, so don't warn for it here
|
|
4721
|
+
// from express-slow-down - https://github.com/express-rate-limit/express-slow-down/blob/main/source/types.ts#L65
|
|
4722
|
+
"delayAfter",
|
|
4723
|
+
"delayMs",
|
|
4724
|
+
"maxDelayMs"
|
|
4725
|
+
);
|
|
4726
|
+
for (const key of Object.keys(passedOptions)) {
|
|
4727
|
+
if (!validOptions.includes(key)) {
|
|
4728
|
+
throw new ValidationError(
|
|
4729
|
+
"ERR_ERL_UNKNOWN_OPTION",
|
|
4730
|
+
`Unexpected configuration option: ${key}`
|
|
4731
|
+
// todo: suggest a valid option with a short levenstein distance?
|
|
4732
|
+
);
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
},
|
|
4694
4736
|
/**
|
|
4695
4737
|
* Checks the options.validate setting to ensure that only recognized
|
|
4696
4738
|
* validations are enabled or disabled.
|
|
4697
4739
|
*
|
|
4698
4740
|
* If any unrecognized values are found, an error is logged that
|
|
4699
|
-
* includes the list of supported
|
|
4741
|
+
* includes the list of supported validations.
|
|
4700
4742
|
*/
|
|
4701
4743
|
validationsConfig() {
|
|
4702
4744
|
const supportedValidations = Object.keys(this).filter(
|
|
@@ -4864,6 +4906,7 @@ var parseOptions = (passedOptions) => {
|
|
|
4864
4906
|
const notUndefinedOptions = omitUndefinedProperties(passedOptions);
|
|
4865
4907
|
const validations2 = getValidations(notUndefinedOptions?.validate ?? true);
|
|
4866
4908
|
validations2.validationsConfig();
|
|
4909
|
+
validations2.knownOptions(passedOptions);
|
|
4867
4910
|
validations2.draftPolliHeaders(
|
|
4868
4911
|
// @ts-expect-error see the note above.
|
|
4869
4912
|
notUndefinedOptions.draft_polli_ratelimit_headers
|
|
@@ -5920,17 +5963,22 @@ function getChangedBlocks(oldText, newText) {
|
|
|
5920
5963
|
const oldBlocks = extractMapBlocks(oldText);
|
|
5921
5964
|
const newBlocks = extractMapBlocks(newText);
|
|
5922
5965
|
const changed = [];
|
|
5966
|
+
const oldLines = oldText.split("\n");
|
|
5967
|
+
const newLines = newText.split("\n");
|
|
5923
5968
|
for (const newBlock of newBlocks) {
|
|
5924
5969
|
const oldMatch = oldBlocks.find((b) => b.uuid === newBlock.uuid);
|
|
5925
5970
|
if (!oldMatch) continue;
|
|
5926
|
-
const
|
|
5927
|
-
const
|
|
5928
|
-
if (
|
|
5971
|
+
const oldContent = extractBlockContent(oldLines, oldMatch.startLine, oldMatch.endLine);
|
|
5972
|
+
const newContent = extractBlockContent(newLines, newBlock.startLine, newBlock.endLine);
|
|
5973
|
+
if (oldContent !== newContent) {
|
|
5929
5974
|
changed.push(newBlock);
|
|
5930
5975
|
}
|
|
5931
5976
|
}
|
|
5932
5977
|
return changed;
|
|
5933
5978
|
}
|
|
5979
|
+
function extractBlockContent(lines, startLine, endLine) {
|
|
5980
|
+
return lines.slice(startLine + 1, endLine - 1).join("\n");
|
|
5981
|
+
}
|
|
5934
5982
|
function getRemovedBlocks(oldText, newText) {
|
|
5935
5983
|
const oldBlocks = extractMapBlocks(oldText);
|
|
5936
5984
|
const newBlocks = extractMapBlocks(newText);
|
|
@@ -6011,20 +6059,27 @@ Please review whether:
|
|
|
6011
6059
|
return { hasFindings: true, warningContent };
|
|
6012
6060
|
}
|
|
6013
6061
|
function generateChangedBlocksContent(filename, changedBlocks, newText) {
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6062
|
+
if (changedBlocks.length === 0) {
|
|
6063
|
+
return "";
|
|
6064
|
+
}
|
|
6065
|
+
console.log(`Commenting regarding \`${filename}\`.`);
|
|
6066
|
+
let content = `
|
|
6018
6067
|
|
|
6019
6068
|
---
|
|
6020
6069
|
| File | Lines Changed |
|
|
6021
6070
|
| ---- | ------------- |
|
|
6022
6071
|
`;
|
|
6072
|
+
for (const block of changedBlocks) {
|
|
6073
|
+
content += `| \`${filename}\` | \`${block.startLine + 1}\u2013${block.endLine}\` |
|
|
6074
|
+
`;
|
|
6075
|
+
}
|
|
6076
|
+
content += `
|
|
6077
|
+
`;
|
|
6078
|
+
for (const block of changedBlocks) {
|
|
6023
6079
|
const newBlockText = newText.split("\n").slice(block.startLine, block.endLine).join("\n");
|
|
6024
6080
|
const blockSha256 = createHash2("sha256").update(newBlockText).digest("hex");
|
|
6025
|
-
content +=
|
|
6026
|
-
|
|
6027
|
-
**sha256** \`${blockSha256}\`
|
|
6081
|
+
content += `**UUID:** \`${block.uuid}\`
|
|
6082
|
+
**sha256:** \`${blockSha256}\`
|
|
6028
6083
|
|
|
6029
6084
|
`;
|
|
6030
6085
|
}
|
|
@@ -6048,11 +6103,16 @@ function generateRemovedBlocksContent(filename, removedBlocks, oldText) {
|
|
|
6048
6103
|
content += `| ---- | -------------- | ---- |
|
|
6049
6104
|
`;
|
|
6050
6105
|
for (const block of removedBlocks) {
|
|
6051
|
-
const oldBlockText = oldText.split("\n").slice(block.startLine, block.endLine).join("\n");
|
|
6052
|
-
const blockSha256 = createHash2("sha256").update(oldBlockText).digest("hex");
|
|
6053
6106
|
content += `| \`${filename}\` | \`${block.startLine + 1}\u2013${block.endLine}\` | \`${block.uuid}\` |
|
|
6054
6107
|
`;
|
|
6055
|
-
|
|
6108
|
+
}
|
|
6109
|
+
content += `
|
|
6110
|
+
`;
|
|
6111
|
+
for (const block of removedBlocks) {
|
|
6112
|
+
const oldBlockText = oldText.split("\n").slice(block.startLine, block.endLine).join("\n");
|
|
6113
|
+
const blockSha256 = createHash2("sha256").update(oldBlockText).digest("hex");
|
|
6114
|
+
content += `**UUID:** \`${block.uuid}\`
|
|
6115
|
+
**sha256:** \`${blockSha256}\`
|
|
6056
6116
|
|
|
6057
6117
|
`;
|
|
6058
6118
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lula2",
|
|
3
|
-
"version": "0.7.0",
|
|
3
|
+
"version": "0.7.1-nightly.0",
|
|
4
4
|
"description": "A tool for managing compliance as code in your GitHub repositories.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lula2": "./dist/lula2"
|
|
@@ -33,25 +33,6 @@
|
|
|
33
33
|
"!dist/**/*.test.js*",
|
|
34
34
|
"!dist/**/*.test.d.ts*"
|
|
35
35
|
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"dev": "vite dev --port 5173",
|
|
38
|
-
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
39
|
-
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
40
|
-
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
41
|
-
"build:svelte": "vite build",
|
|
42
|
-
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:xlsx-republish --external:csv-parse",
|
|
43
|
-
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
44
|
-
"preview": "vite preview",
|
|
45
|
-
"prepare": "svelte-kit sync || echo ''",
|
|
46
|
-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
47
|
-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
48
|
-
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
49
|
-
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
50
|
-
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
51
|
-
"test": "npm run test:unit -- --run --coverage",
|
|
52
|
-
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
53
|
-
"test:unit": "vitest"
|
|
54
|
-
},
|
|
55
36
|
"dependencies": {
|
|
56
37
|
"@octokit/rest": "^22.0.0",
|
|
57
38
|
"@types/ws": "^8.18.1",
|
|
@@ -95,7 +76,7 @@
|
|
|
95
76
|
"carbon-icons-svelte": "^13.5.0",
|
|
96
77
|
"carbon-preprocess-svelte": "^0.11.11",
|
|
97
78
|
"concurrently": "^9.2.1",
|
|
98
|
-
"esbuild": "^0.
|
|
79
|
+
"esbuild": "^0.27.0",
|
|
99
80
|
"eslint": "^9.35.0",
|
|
100
81
|
"eslint-config-prettier": "^10.1.8",
|
|
101
82
|
"eslint-plugin-jsdoc": "^61.0.0",
|
|
@@ -124,5 +105,23 @@
|
|
|
124
105
|
"main",
|
|
125
106
|
"next"
|
|
126
107
|
]
|
|
108
|
+
},
|
|
109
|
+
"scripts": {
|
|
110
|
+
"dev": "vite dev --port 5173",
|
|
111
|
+
"dev:api": "tsx --watch index.ts --debug ui --port 3000 --no-open-browser",
|
|
112
|
+
"dev:full": "concurrently \"npm run dev:api\" \"npm run dev\"",
|
|
113
|
+
"build": "npm run build:svelte && npm run build:cli && npm run postbuild:cli",
|
|
114
|
+
"build:svelte": "vite build",
|
|
115
|
+
"build:cli": "esbuild index.ts cli/**/*.ts --bundle --platform=node --target=node22 --format=esm --outdir=dist --external:express --external:commander --external:js-yaml --external:yaml --external:isomorphic-git --external:glob --external:open --external:ws --external:cors --external:multer --external:@octokit/rest --external:undici --external:xlsx-republish --external:csv-parse",
|
|
116
|
+
"postbuild:cli": "cp cli-wrapper.mjs dist/lula2 && chmod +x dist/lula2",
|
|
117
|
+
"preview": "vite preview",
|
|
118
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && tsc --noEmit",
|
|
119
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
120
|
+
"format": "prettier --write 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
121
|
+
"format:check": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts'",
|
|
122
|
+
"lint": "prettier --check 'src/**/*.{ts,js,svelte}' 'cli/**/*.ts' 'index.ts' 'tests/**/*.ts' && eslint src cli",
|
|
123
|
+
"test": "npm run test:unit -- --run --coverage",
|
|
124
|
+
"test:integration": "vitest --config integration/vitest.config.integration.ts",
|
|
125
|
+
"test:unit": "vitest"
|
|
127
126
|
}
|
|
128
|
-
}
|
|
127
|
+
}
|