@kubohiroya/turbowarp-cloudflare-worker 0.3.0 → 0.3.1
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.ja.md +2 -0
- package/README.md +2 -0
- package/dist/turbowarp-cloudflare-worker.js +555 -152
- package/docs/fixed-input-editors.ja.md +22 -0
- package/docs/index.html +7 -1
- package/package.json +9 -3
- package/schemas/block-editor-fixed-inputs.schema.json +119 -0
- package/src/extension.ts +5 -1
- package/src/fixed-input-editors.ts +206 -0
- package/src/fixed-input-schema.ts +17 -0
|
@@ -2719,16 +2719,16 @@
|
|
|
2719
2719
|
}
|
|
2720
2720
|
}));
|
|
2721
2721
|
var data_exports = /* @__PURE__ */ __exportAll({
|
|
2722
|
-
$id: () => $id$
|
|
2722
|
+
$id: () => $id$14,
|
|
2723
2723
|
additionalProperties: () => false,
|
|
2724
2724
|
default: () => data_default,
|
|
2725
2725
|
description: () => description,
|
|
2726
2726
|
properties: () => properties$11,
|
|
2727
2727
|
required: () => required$2,
|
|
2728
2728
|
type: () => type$11
|
|
2729
|
-
}), $id$
|
|
2729
|
+
}), $id$14, description, type$11, required$2, properties$11, data_default;
|
|
2730
2730
|
var init_data = __esmMin((() => {
|
|
2731
|
-
$id$
|
|
2731
|
+
$id$14 = "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#";
|
|
2732
2732
|
description = "Meta-schema for $data reference (JSON AnySchema extension proposal)";
|
|
2733
2733
|
type$11 = "object";
|
|
2734
2734
|
required$2 = ["$data"];
|
|
@@ -2737,7 +2737,7 @@
|
|
|
2737
2737
|
"anyOf": [{ "format": "relative-json-pointer" }, { "format": "json-pointer" }]
|
|
2738
2738
|
} };
|
|
2739
2739
|
data_default = {
|
|
2740
|
-
$id: $id$
|
|
2740
|
+
$id: $id$14,
|
|
2741
2741
|
description,
|
|
2742
2742
|
type: type$11,
|
|
2743
2743
|
required: required$2,
|
|
@@ -5989,18 +5989,18 @@
|
|
|
5989
5989
|
};
|
|
5990
5990
|
}));
|
|
5991
5991
|
var json_schema_draft_07_exports = /* @__PURE__ */ __exportAll({
|
|
5992
|
-
$id: () => $id$
|
|
5993
|
-
$schema: () => $schema$
|
|
5992
|
+
$id: () => $id$13,
|
|
5993
|
+
$schema: () => $schema$13,
|
|
5994
5994
|
default: () => json_schema_draft_07_default,
|
|
5995
5995
|
definitions: () => definitions$1,
|
|
5996
5996
|
properties: () => properties$10,
|
|
5997
5997
|
title: () => title$8,
|
|
5998
5998
|
type: () => type$10
|
|
5999
5999
|
});
|
|
6000
|
-
var $schema$
|
|
6000
|
+
var $schema$13, $id$13, title$8, definitions$1, type$10, properties$10, json_schema_draft_07_default;
|
|
6001
6001
|
var init_json_schema_draft_07 = __esmMin((() => {
|
|
6002
|
-
$schema$
|
|
6003
|
-
$id$
|
|
6002
|
+
$schema$13 = "http://json-schema.org/draft-07/schema#";
|
|
6003
|
+
$id$13 = "http://json-schema.org/draft-07/schema#";
|
|
6004
6004
|
title$8 = "Core schema meta-schema";
|
|
6005
6005
|
definitions$1 = {
|
|
6006
6006
|
"schemaArray": {
|
|
@@ -6131,8 +6131,8 @@
|
|
|
6131
6131
|
"not": { "$ref": "#" }
|
|
6132
6132
|
};
|
|
6133
6133
|
json_schema_draft_07_default = {
|
|
6134
|
-
$schema: $schema$
|
|
6135
|
-
$id: $id$
|
|
6134
|
+
$schema: $schema$13,
|
|
6135
|
+
$id: $id$13,
|
|
6136
6136
|
title: title$8,
|
|
6137
6137
|
definitions: definitions$1,
|
|
6138
6138
|
type: type$10,
|
|
@@ -6504,8 +6504,8 @@
|
|
|
6504
6504
|
var schema_exports = /* @__PURE__ */ __exportAll({
|
|
6505
6505
|
$comment: () => $comment,
|
|
6506
6506
|
$dynamicAnchor: () => $dynamicAnchor$7,
|
|
6507
|
-
$id: () => $id$
|
|
6508
|
-
$schema: () => $schema$
|
|
6507
|
+
$id: () => $id$12,
|
|
6508
|
+
$schema: () => $schema$12,
|
|
6509
6509
|
$vocabulary: () => $vocabulary$7,
|
|
6510
6510
|
allOf: () => allOf,
|
|
6511
6511
|
default: () => schema_default,
|
|
@@ -6513,10 +6513,10 @@
|
|
|
6513
6513
|
title: () => title$7,
|
|
6514
6514
|
type: () => type$9
|
|
6515
6515
|
});
|
|
6516
|
-
var $schema$
|
|
6516
|
+
var $schema$12, $id$12, $vocabulary$7, $dynamicAnchor$7, title$7, allOf, type$9, $comment, properties$9, schema_default;
|
|
6517
6517
|
var init_schema = __esmMin((() => {
|
|
6518
|
-
$schema$
|
|
6519
|
-
$id$
|
|
6518
|
+
$schema$12 = "https://json-schema.org/draft/2020-12/schema";
|
|
6519
|
+
$id$12 = "https://json-schema.org/draft/2020-12/schema";
|
|
6520
6520
|
$vocabulary$7 = {
|
|
6521
6521
|
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
6522
6522
|
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
@@ -6566,8 +6566,8 @@
|
|
|
6566
6566
|
}
|
|
6567
6567
|
};
|
|
6568
6568
|
schema_default = {
|
|
6569
|
-
$schema: $schema$
|
|
6570
|
-
$id: $id$
|
|
6569
|
+
$schema: $schema$12,
|
|
6570
|
+
$id: $id$12,
|
|
6571
6571
|
$vocabulary: $vocabulary$7,
|
|
6572
6572
|
$dynamicAnchor: $dynamicAnchor$7,
|
|
6573
6573
|
title: title$7,
|
|
@@ -6578,20 +6578,20 @@
|
|
|
6578
6578
|
};
|
|
6579
6579
|
}));
|
|
6580
6580
|
var applicator_exports = /* @__PURE__ */ __exportAll({
|
|
6581
|
-
$defs: () => $defs$
|
|
6581
|
+
$defs: () => $defs$3,
|
|
6582
6582
|
$dynamicAnchor: () => $dynamicAnchor$6,
|
|
6583
|
-
$id: () => $id$
|
|
6584
|
-
$schema: () => $schema$
|
|
6583
|
+
$id: () => $id$11,
|
|
6584
|
+
$schema: () => $schema$11,
|
|
6585
6585
|
$vocabulary: () => $vocabulary$6,
|
|
6586
6586
|
default: () => applicator_default,
|
|
6587
6587
|
properties: () => properties$8,
|
|
6588
6588
|
title: () => title$6,
|
|
6589
6589
|
type: () => type$8
|
|
6590
6590
|
});
|
|
6591
|
-
var $schema$
|
|
6591
|
+
var $schema$11, $id$11, $vocabulary$6, $dynamicAnchor$6, title$6, type$8, properties$8, $defs$3, applicator_default;
|
|
6592
6592
|
var init_applicator = __esmMin((() => {
|
|
6593
|
-
$schema$
|
|
6594
|
-
$id$
|
|
6593
|
+
$schema$11 = "https://json-schema.org/draft/2020-12/schema";
|
|
6594
|
+
$id$11 = "https://json-schema.org/draft/2020-12/meta/applicator";
|
|
6595
6595
|
$vocabulary$6 = { "https://json-schema.org/draft/2020-12/vocab/applicator": true };
|
|
6596
6596
|
$dynamicAnchor$6 = "meta";
|
|
6597
6597
|
title$6 = "Applicator vocabulary meta-schema";
|
|
@@ -6626,36 +6626,36 @@
|
|
|
6626
6626
|
"oneOf": { "$ref": "#/$defs/schemaArray" },
|
|
6627
6627
|
"not": { "$dynamicRef": "#meta" }
|
|
6628
6628
|
};
|
|
6629
|
-
$defs$
|
|
6629
|
+
$defs$3 = { "schemaArray": {
|
|
6630
6630
|
"type": "array",
|
|
6631
6631
|
"minItems": 1,
|
|
6632
6632
|
"items": { "$dynamicRef": "#meta" }
|
|
6633
6633
|
} };
|
|
6634
6634
|
applicator_default = {
|
|
6635
|
-
$schema: $schema$
|
|
6636
|
-
$id: $id$
|
|
6635
|
+
$schema: $schema$11,
|
|
6636
|
+
$id: $id$11,
|
|
6637
6637
|
$vocabulary: $vocabulary$6,
|
|
6638
6638
|
$dynamicAnchor: $dynamicAnchor$6,
|
|
6639
6639
|
title: title$6,
|
|
6640
6640
|
type: type$8,
|
|
6641
6641
|
properties: properties$8,
|
|
6642
|
-
$defs: $defs$
|
|
6642
|
+
$defs: $defs$3
|
|
6643
6643
|
};
|
|
6644
6644
|
}));
|
|
6645
6645
|
var unevaluated_exports = /* @__PURE__ */ __exportAll({
|
|
6646
6646
|
$dynamicAnchor: () => $dynamicAnchor$5,
|
|
6647
|
-
$id: () => $id$
|
|
6648
|
-
$schema: () => $schema$
|
|
6647
|
+
$id: () => $id$10,
|
|
6648
|
+
$schema: () => $schema$10,
|
|
6649
6649
|
$vocabulary: () => $vocabulary$5,
|
|
6650
6650
|
default: () => unevaluated_default,
|
|
6651
6651
|
properties: () => properties$7,
|
|
6652
6652
|
title: () => title$5,
|
|
6653
6653
|
type: () => type$7
|
|
6654
6654
|
});
|
|
6655
|
-
var $schema$
|
|
6655
|
+
var $schema$10, $id$10, $vocabulary$5, $dynamicAnchor$5, title$5, type$7, properties$7, unevaluated_default;
|
|
6656
6656
|
var init_unevaluated = __esmMin((() => {
|
|
6657
|
-
$schema$
|
|
6658
|
-
$id$
|
|
6657
|
+
$schema$10 = "https://json-schema.org/draft/2020-12/schema";
|
|
6658
|
+
$id$10 = "https://json-schema.org/draft/2020-12/meta/unevaluated";
|
|
6659
6659
|
$vocabulary$5 = { "https://json-schema.org/draft/2020-12/vocab/unevaluated": true };
|
|
6660
6660
|
$dynamicAnchor$5 = "meta";
|
|
6661
6661
|
title$5 = "Unevaluated applicator vocabulary meta-schema";
|
|
@@ -6665,8 +6665,8 @@
|
|
|
6665
6665
|
"unevaluatedProperties": { "$dynamicRef": "#meta" }
|
|
6666
6666
|
};
|
|
6667
6667
|
unevaluated_default = {
|
|
6668
|
-
$schema: $schema$
|
|
6669
|
-
$id: $id$
|
|
6668
|
+
$schema: $schema$10,
|
|
6669
|
+
$id: $id$10,
|
|
6670
6670
|
$vocabulary: $vocabulary$5,
|
|
6671
6671
|
$dynamicAnchor: $dynamicAnchor$5,
|
|
6672
6672
|
title: title$5,
|
|
@@ -6676,18 +6676,18 @@
|
|
|
6676
6676
|
}));
|
|
6677
6677
|
var content_exports = /* @__PURE__ */ __exportAll({
|
|
6678
6678
|
$dynamicAnchor: () => $dynamicAnchor$4,
|
|
6679
|
-
$id: () => $id$
|
|
6680
|
-
$schema: () => $schema$
|
|
6679
|
+
$id: () => $id$9,
|
|
6680
|
+
$schema: () => $schema$9,
|
|
6681
6681
|
$vocabulary: () => $vocabulary$4,
|
|
6682
6682
|
default: () => content_default,
|
|
6683
6683
|
properties: () => properties$6,
|
|
6684
6684
|
title: () => title$4,
|
|
6685
6685
|
type: () => type$6
|
|
6686
6686
|
});
|
|
6687
|
-
var $schema$
|
|
6687
|
+
var $schema$9, $id$9, $vocabulary$4, $dynamicAnchor$4, title$4, type$6, properties$6, content_default;
|
|
6688
6688
|
var init_content = __esmMin((() => {
|
|
6689
|
-
$schema$
|
|
6690
|
-
$id$
|
|
6689
|
+
$schema$9 = "https://json-schema.org/draft/2020-12/schema";
|
|
6690
|
+
$id$9 = "https://json-schema.org/draft/2020-12/meta/content";
|
|
6691
6691
|
$vocabulary$4 = { "https://json-schema.org/draft/2020-12/vocab/content": true };
|
|
6692
6692
|
$dynamicAnchor$4 = "meta";
|
|
6693
6693
|
title$4 = "Content vocabulary meta-schema";
|
|
@@ -6698,8 +6698,8 @@
|
|
|
6698
6698
|
"contentSchema": { "$dynamicRef": "#meta" }
|
|
6699
6699
|
};
|
|
6700
6700
|
content_default = {
|
|
6701
|
-
$schema: $schema$
|
|
6702
|
-
$id: $id$
|
|
6701
|
+
$schema: $schema$9,
|
|
6702
|
+
$id: $id$9,
|
|
6703
6703
|
$vocabulary: $vocabulary$4,
|
|
6704
6704
|
$dynamicAnchor: $dynamicAnchor$4,
|
|
6705
6705
|
title: title$4,
|
|
@@ -6708,20 +6708,20 @@
|
|
|
6708
6708
|
};
|
|
6709
6709
|
}));
|
|
6710
6710
|
var core_exports = /* @__PURE__ */ __exportAll({
|
|
6711
|
-
$defs: () => $defs$
|
|
6711
|
+
$defs: () => $defs$2,
|
|
6712
6712
|
$dynamicAnchor: () => $dynamicAnchor$3,
|
|
6713
|
-
$id: () => $id$
|
|
6714
|
-
$schema: () => $schema$
|
|
6713
|
+
$id: () => $id$8,
|
|
6714
|
+
$schema: () => $schema$8,
|
|
6715
6715
|
$vocabulary: () => $vocabulary$3,
|
|
6716
6716
|
default: () => core_default,
|
|
6717
6717
|
properties: () => properties$5,
|
|
6718
6718
|
title: () => title$3,
|
|
6719
6719
|
type: () => type$5
|
|
6720
6720
|
});
|
|
6721
|
-
var $schema$
|
|
6721
|
+
var $schema$8, $id$8, $vocabulary$3, $dynamicAnchor$3, title$3, type$5, properties$5, $defs$2, core_default;
|
|
6722
6722
|
var init_core = __esmMin((() => {
|
|
6723
|
-
$schema$
|
|
6724
|
-
$id$
|
|
6723
|
+
$schema$8 = "https://json-schema.org/draft/2020-12/schema";
|
|
6724
|
+
$id$8 = "https://json-schema.org/draft/2020-12/meta/core";
|
|
6725
6725
|
$vocabulary$3 = { "https://json-schema.org/draft/2020-12/vocab/core": true };
|
|
6726
6726
|
$dynamicAnchor$3 = "meta";
|
|
6727
6727
|
title$3 = "Core vocabulary meta-schema";
|
|
@@ -6748,7 +6748,7 @@
|
|
|
6748
6748
|
"additionalProperties": { "$dynamicRef": "#meta" }
|
|
6749
6749
|
}
|
|
6750
6750
|
};
|
|
6751
|
-
$defs$
|
|
6751
|
+
$defs$2 = {
|
|
6752
6752
|
"anchorString": {
|
|
6753
6753
|
"type": "string",
|
|
6754
6754
|
"pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
@@ -6763,38 +6763,38 @@
|
|
|
6763
6763
|
}
|
|
6764
6764
|
};
|
|
6765
6765
|
core_default = {
|
|
6766
|
-
$schema: $schema$
|
|
6767
|
-
$id: $id$
|
|
6766
|
+
$schema: $schema$8,
|
|
6767
|
+
$id: $id$8,
|
|
6768
6768
|
$vocabulary: $vocabulary$3,
|
|
6769
6769
|
$dynamicAnchor: $dynamicAnchor$3,
|
|
6770
6770
|
title: title$3,
|
|
6771
6771
|
type: type$5,
|
|
6772
6772
|
properties: properties$5,
|
|
6773
|
-
$defs: $defs$
|
|
6773
|
+
$defs: $defs$2
|
|
6774
6774
|
};
|
|
6775
6775
|
}));
|
|
6776
6776
|
var format_annotation_exports = /* @__PURE__ */ __exportAll({
|
|
6777
6777
|
$dynamicAnchor: () => $dynamicAnchor$2,
|
|
6778
|
-
$id: () => $id$
|
|
6779
|
-
$schema: () => $schema$
|
|
6778
|
+
$id: () => $id$7,
|
|
6779
|
+
$schema: () => $schema$7,
|
|
6780
6780
|
$vocabulary: () => $vocabulary$2,
|
|
6781
6781
|
default: () => format_annotation_default,
|
|
6782
6782
|
properties: () => properties$4,
|
|
6783
6783
|
title: () => title$2,
|
|
6784
6784
|
type: () => type$4
|
|
6785
6785
|
});
|
|
6786
|
-
var $schema$
|
|
6786
|
+
var $schema$7, $id$7, $vocabulary$2, $dynamicAnchor$2, title$2, type$4, properties$4, format_annotation_default;
|
|
6787
6787
|
var init_format_annotation = __esmMin((() => {
|
|
6788
|
-
$schema$
|
|
6789
|
-
$id$
|
|
6788
|
+
$schema$7 = "https://json-schema.org/draft/2020-12/schema";
|
|
6789
|
+
$id$7 = "https://json-schema.org/draft/2020-12/meta/format-annotation";
|
|
6790
6790
|
$vocabulary$2 = { "https://json-schema.org/draft/2020-12/vocab/format-annotation": true };
|
|
6791
6791
|
$dynamicAnchor$2 = "meta";
|
|
6792
6792
|
title$2 = "Format vocabulary meta-schema for annotation results";
|
|
6793
6793
|
type$4 = ["object", "boolean"];
|
|
6794
6794
|
properties$4 = { "format": { "type": "string" } };
|
|
6795
6795
|
format_annotation_default = {
|
|
6796
|
-
$schema: $schema$
|
|
6797
|
-
$id: $id$
|
|
6796
|
+
$schema: $schema$7,
|
|
6797
|
+
$id: $id$7,
|
|
6798
6798
|
$vocabulary: $vocabulary$2,
|
|
6799
6799
|
$dynamicAnchor: $dynamicAnchor$2,
|
|
6800
6800
|
title: title$2,
|
|
@@ -6804,18 +6804,18 @@
|
|
|
6804
6804
|
}));
|
|
6805
6805
|
var meta_data_exports = /* @__PURE__ */ __exportAll({
|
|
6806
6806
|
$dynamicAnchor: () => $dynamicAnchor$1,
|
|
6807
|
-
$id: () => $id$
|
|
6808
|
-
$schema: () => $schema$
|
|
6807
|
+
$id: () => $id$6,
|
|
6808
|
+
$schema: () => $schema$6,
|
|
6809
6809
|
$vocabulary: () => $vocabulary$1,
|
|
6810
6810
|
default: () => meta_data_default,
|
|
6811
6811
|
properties: () => properties$3,
|
|
6812
6812
|
title: () => title$1,
|
|
6813
6813
|
type: () => type$3
|
|
6814
6814
|
});
|
|
6815
|
-
var $schema$
|
|
6815
|
+
var $schema$6, $id$6, $vocabulary$1, $dynamicAnchor$1, title$1, type$3, properties$3, meta_data_default;
|
|
6816
6816
|
var init_meta_data = __esmMin((() => {
|
|
6817
|
-
$schema$
|
|
6818
|
-
$id$
|
|
6817
|
+
$schema$6 = "https://json-schema.org/draft/2020-12/schema";
|
|
6818
|
+
$id$6 = "https://json-schema.org/draft/2020-12/meta/meta-data";
|
|
6819
6819
|
$vocabulary$1 = { "https://json-schema.org/draft/2020-12/vocab/meta-data": true };
|
|
6820
6820
|
$dynamicAnchor$1 = "meta";
|
|
6821
6821
|
title$1 = "Meta-data vocabulary meta-schema";
|
|
@@ -6842,8 +6842,8 @@
|
|
|
6842
6842
|
}
|
|
6843
6843
|
};
|
|
6844
6844
|
meta_data_default = {
|
|
6845
|
-
$schema: $schema$
|
|
6846
|
-
$id: $id$
|
|
6845
|
+
$schema: $schema$6,
|
|
6846
|
+
$id: $id$6,
|
|
6847
6847
|
$vocabulary: $vocabulary$1,
|
|
6848
6848
|
$dynamicAnchor: $dynamicAnchor$1,
|
|
6849
6849
|
title: title$1,
|
|
@@ -6852,20 +6852,20 @@
|
|
|
6852
6852
|
};
|
|
6853
6853
|
}));
|
|
6854
6854
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
|
6855
|
-
$defs: () => $defs,
|
|
6855
|
+
$defs: () => $defs$1,
|
|
6856
6856
|
$dynamicAnchor: () => $dynamicAnchor,
|
|
6857
|
-
$id: () => $id$
|
|
6858
|
-
$schema: () => $schema$
|
|
6857
|
+
$id: () => $id$5,
|
|
6858
|
+
$schema: () => $schema$5,
|
|
6859
6859
|
$vocabulary: () => $vocabulary,
|
|
6860
6860
|
default: () => validation_default,
|
|
6861
6861
|
properties: () => properties$2,
|
|
6862
6862
|
title: () => title,
|
|
6863
6863
|
type: () => type$2
|
|
6864
6864
|
});
|
|
6865
|
-
var $schema$
|
|
6865
|
+
var $schema$5, $id$5, $vocabulary, $dynamicAnchor, title, type$2, properties$2, $defs$1, validation_default;
|
|
6866
6866
|
var init_validation = __esmMin((() => {
|
|
6867
|
-
$schema$
|
|
6868
|
-
$id$
|
|
6867
|
+
$schema$5 = "https://json-schema.org/draft/2020-12/schema";
|
|
6868
|
+
$id$5 = "https://json-schema.org/draft/2020-12/meta/validation";
|
|
6869
6869
|
$vocabulary = { "https://json-schema.org/draft/2020-12/vocab/validation": true };
|
|
6870
6870
|
$dynamicAnchor = "meta";
|
|
6871
6871
|
title = "Validation vocabulary meta-schema";
|
|
@@ -6915,7 +6915,7 @@
|
|
|
6915
6915
|
"additionalProperties": { "$ref": "#/$defs/stringArray" }
|
|
6916
6916
|
}
|
|
6917
6917
|
};
|
|
6918
|
-
$defs = {
|
|
6918
|
+
$defs$1 = {
|
|
6919
6919
|
"nonNegativeInteger": {
|
|
6920
6920
|
"type": "integer",
|
|
6921
6921
|
"minimum": 0
|
|
@@ -6941,14 +6941,14 @@
|
|
|
6941
6941
|
}
|
|
6942
6942
|
};
|
|
6943
6943
|
validation_default = {
|
|
6944
|
-
$schema: $schema$
|
|
6945
|
-
$id: $id$
|
|
6944
|
+
$schema: $schema$5,
|
|
6945
|
+
$id: $id$5,
|
|
6946
6946
|
$vocabulary,
|
|
6947
6947
|
$dynamicAnchor,
|
|
6948
6948
|
title,
|
|
6949
6949
|
type: type$2,
|
|
6950
6950
|
properties: properties$2,
|
|
6951
|
-
$defs
|
|
6951
|
+
$defs: $defs$1
|
|
6952
6952
|
};
|
|
6953
6953
|
}));
|
|
6954
6954
|
var require_json_schema_2020_12 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -7861,6 +7861,482 @@
|
|
|
7861
7861
|
return ownerFailure(scope, "owner-result-invalid");
|
|
7862
7862
|
}
|
|
7863
7863
|
}
|
|
7864
|
+
var numberToken = /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$/u;
|
|
7865
|
+
var invalidNumber = Object.freeze({
|
|
7866
|
+
kind: "invalid",
|
|
7867
|
+
code: "fixed-number-input-invalid"
|
|
7868
|
+
});
|
|
7869
|
+
/**
|
|
7870
|
+
* Parse a NEW numeric draft according to NP-finite-new-input-v1.
|
|
7871
|
+
* Never apply this to opening/no-op raw values or use it as an owner validator.
|
|
7872
|
+
* Keep the validated token so negative zero, precision and exponent spelling survive.
|
|
7873
|
+
*/
|
|
7874
|
+
function parseFixedNumberInput(input) {
|
|
7875
|
+
if (typeof input === "number") {
|
|
7876
|
+
if (!Number.isFinite(input)) return invalidNumber;
|
|
7877
|
+
return Object.freeze({
|
|
7878
|
+
kind: "valid",
|
|
7879
|
+
token: Object.is(input, -0) ? "-0" : String(input),
|
|
7880
|
+
value: input
|
|
7881
|
+
});
|
|
7882
|
+
}
|
|
7883
|
+
if (typeof input !== "string") return invalidNumber;
|
|
7884
|
+
const token = input.trim();
|
|
7885
|
+
if (!numberToken.test(token)) return invalidNumber;
|
|
7886
|
+
const value = Number(token);
|
|
7887
|
+
return Number.isFinite(value) ? Object.freeze({
|
|
7888
|
+
kind: "valid",
|
|
7889
|
+
token,
|
|
7890
|
+
value
|
|
7891
|
+
}) : invalidNumber;
|
|
7892
|
+
}
|
|
7893
|
+
var block_editor_fixed_inputs_schema_default = {
|
|
7894
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7895
|
+
$id: "https://kubohiroya.github.io/turbowarp-cloudflare-worker/schemas/block-editor-fixed-inputs.schema.json",
|
|
7896
|
+
$defs: {
|
|
7897
|
+
"createHandlerIr": {
|
|
7898
|
+
"type": "object",
|
|
7899
|
+
"properties": { "METHOD": {
|
|
7900
|
+
"type": "string",
|
|
7901
|
+
"enum": [
|
|
7902
|
+
"GET",
|
|
7903
|
+
"POST",
|
|
7904
|
+
"PUT",
|
|
7905
|
+
"PATCH",
|
|
7906
|
+
"DELETE",
|
|
7907
|
+
"OPTIONS",
|
|
7908
|
+
"HEAD"
|
|
7909
|
+
]
|
|
7910
|
+
} },
|
|
7911
|
+
"required": ["METHOD"],
|
|
7912
|
+
"additionalProperties": true
|
|
7913
|
+
},
|
|
7914
|
+
"createProtectedRouteIr": {
|
|
7915
|
+
"type": "object",
|
|
7916
|
+
"properties": {
|
|
7917
|
+
"METHOD": {
|
|
7918
|
+
"type": "string",
|
|
7919
|
+
"enum": [
|
|
7920
|
+
"GET",
|
|
7921
|
+
"POST",
|
|
7922
|
+
"PUT",
|
|
7923
|
+
"PATCH",
|
|
7924
|
+
"DELETE",
|
|
7925
|
+
"OPTIONS",
|
|
7926
|
+
"HEAD",
|
|
7927
|
+
"*"
|
|
7928
|
+
]
|
|
7929
|
+
},
|
|
7930
|
+
"ON_UNAUTHENTICATED": { "$ref": "https://kubohiroya.github.io/turbowarp-http-server-cloudflare/schemas/protected-routes.schema.json#/anyOf/0/properties/onUnauthenticated" }
|
|
7931
|
+
},
|
|
7932
|
+
"required": ["METHOD", "ON_UNAUTHENTICATED"],
|
|
7933
|
+
"additionalProperties": true
|
|
7934
|
+
},
|
|
7935
|
+
"createBearerRouteIr": {
|
|
7936
|
+
"type": "object",
|
|
7937
|
+
"properties": { "METHOD": {
|
|
7938
|
+
"type": "string",
|
|
7939
|
+
"enum": [
|
|
7940
|
+
"GET",
|
|
7941
|
+
"POST",
|
|
7942
|
+
"PUT",
|
|
7943
|
+
"PATCH",
|
|
7944
|
+
"DELETE",
|
|
7945
|
+
"OPTIONS",
|
|
7946
|
+
"HEAD",
|
|
7947
|
+
"*"
|
|
7948
|
+
]
|
|
7949
|
+
} },
|
|
7950
|
+
"required": ["METHOD"],
|
|
7951
|
+
"additionalProperties": true
|
|
7952
|
+
},
|
|
7953
|
+
"createBearerRoleRouteIr": {
|
|
7954
|
+
"type": "object",
|
|
7955
|
+
"properties": { "METHOD": {
|
|
7956
|
+
"type": "string",
|
|
7957
|
+
"enum": [
|
|
7958
|
+
"GET",
|
|
7959
|
+
"POST",
|
|
7960
|
+
"PUT",
|
|
7961
|
+
"PATCH",
|
|
7962
|
+
"DELETE",
|
|
7963
|
+
"OPTIONS",
|
|
7964
|
+
"HEAD",
|
|
7965
|
+
"*"
|
|
7966
|
+
]
|
|
7967
|
+
} },
|
|
7968
|
+
"required": ["METHOD"],
|
|
7969
|
+
"additionalProperties": true
|
|
7970
|
+
},
|
|
7971
|
+
"createBearerScopeRouteIr": {
|
|
7972
|
+
"type": "object",
|
|
7973
|
+
"properties": { "METHOD": {
|
|
7974
|
+
"type": "string",
|
|
7975
|
+
"enum": [
|
|
7976
|
+
"GET",
|
|
7977
|
+
"POST",
|
|
7978
|
+
"PUT",
|
|
7979
|
+
"PATCH",
|
|
7980
|
+
"DELETE",
|
|
7981
|
+
"OPTIONS",
|
|
7982
|
+
"HEAD",
|
|
7983
|
+
"*"
|
|
7984
|
+
]
|
|
7985
|
+
} },
|
|
7986
|
+
"required": ["METHOD"],
|
|
7987
|
+
"additionalProperties": true
|
|
7988
|
+
}
|
|
7989
|
+
}
|
|
7990
|
+
};
|
|
7991
|
+
var protected_routes_schema_default = {
|
|
7992
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
7993
|
+
$id: "https://kubohiroya.github.io/turbowarp-http-server-cloudflare/schemas/protected-routes.schema.json",
|
|
7994
|
+
anyOf: [{
|
|
7995
|
+
"type": "object",
|
|
7996
|
+
"required": [
|
|
7997
|
+
"method",
|
|
7998
|
+
"path",
|
|
7999
|
+
"onUnauthenticated"
|
|
8000
|
+
],
|
|
8001
|
+
"properties": {
|
|
8002
|
+
"method": {
|
|
8003
|
+
"type": "string",
|
|
8004
|
+
"minLength": 1
|
|
8005
|
+
},
|
|
8006
|
+
"path": {
|
|
8007
|
+
"type": "string",
|
|
8008
|
+
"minLength": 1
|
|
8009
|
+
},
|
|
8010
|
+
"onUnauthenticated": { "enum": [
|
|
8011
|
+
"redirect-login",
|
|
8012
|
+
"json-401",
|
|
8013
|
+
"forbid-403"
|
|
8014
|
+
] },
|
|
8015
|
+
"auth": { "enum": ["session", "bearer-jwt"] },
|
|
8016
|
+
"requiredRole": {
|
|
8017
|
+
"type": "string",
|
|
8018
|
+
"minLength": 1
|
|
8019
|
+
},
|
|
8020
|
+
"requiredScopes": {
|
|
8021
|
+
"type": "array",
|
|
8022
|
+
"items": {
|
|
8023
|
+
"type": "string",
|
|
8024
|
+
"minLength": 1
|
|
8025
|
+
}
|
|
8026
|
+
}
|
|
8027
|
+
}
|
|
8028
|
+
}, {
|
|
8029
|
+
"type": "array",
|
|
8030
|
+
"items": {
|
|
8031
|
+
"type": "object",
|
|
8032
|
+
"required": [
|
|
8033
|
+
"method",
|
|
8034
|
+
"path",
|
|
8035
|
+
"onUnauthenticated"
|
|
8036
|
+
],
|
|
8037
|
+
"properties": {
|
|
8038
|
+
"method": {
|
|
8039
|
+
"type": "string",
|
|
8040
|
+
"minLength": 1
|
|
8041
|
+
},
|
|
8042
|
+
"path": {
|
|
8043
|
+
"type": "string",
|
|
8044
|
+
"minLength": 1
|
|
8045
|
+
},
|
|
8046
|
+
"onUnauthenticated": { "enum": [
|
|
8047
|
+
"redirect-login",
|
|
8048
|
+
"json-401",
|
|
8049
|
+
"forbid-403"
|
|
8050
|
+
] },
|
|
8051
|
+
"auth": { "enum": ["session", "bearer-jwt"] },
|
|
8052
|
+
"requiredRole": {
|
|
8053
|
+
"type": "string",
|
|
8054
|
+
"minLength": 1
|
|
8055
|
+
},
|
|
8056
|
+
"requiredScopes": {
|
|
8057
|
+
"type": "array",
|
|
8058
|
+
"items": {
|
|
8059
|
+
"type": "string",
|
|
8060
|
+
"minLength": 1
|
|
8061
|
+
}
|
|
8062
|
+
}
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
}]
|
|
8066
|
+
};
|
|
8067
|
+
var repository$1 = "turbowarp-cloudflare-worker";
|
|
8068
|
+
/** The owner JSON document is canonical; this selects a primitive field fragment. */
|
|
8069
|
+
function fixedInputBundle(opcode, argument) {
|
|
8070
|
+
const source = {
|
|
8071
|
+
repository: repository$1,
|
|
8072
|
+
path: "schemas/block-editor-fixed-inputs.schema.json",
|
|
8073
|
+
symbol: `#/$defs/${opcode}/properties/${argument}`
|
|
8074
|
+
};
|
|
8075
|
+
const blocks = block_editor_fixed_inputs_schema_default.$defs;
|
|
8076
|
+
return {
|
|
8077
|
+
identity: {
|
|
8078
|
+
ownerId: repository$1,
|
|
8079
|
+
contractId: opcode,
|
|
8080
|
+
revision: "fixed-inputs-v1",
|
|
8081
|
+
variantId: argument
|
|
8082
|
+
},
|
|
8083
|
+
dialect: "2020-12",
|
|
8084
|
+
root: {
|
|
8085
|
+
retrievalUri: block_editor_fixed_inputs_schema_default.$id,
|
|
8086
|
+
document: blocks[opcode].properties[argument],
|
|
8087
|
+
artifact: {
|
|
8088
|
+
role: "canonical-schema",
|
|
8089
|
+
source
|
|
8090
|
+
}
|
|
8091
|
+
},
|
|
8092
|
+
resources: [{
|
|
8093
|
+
retrievalUri: protected_routes_schema_default.$id,
|
|
8094
|
+
document: protected_routes_schema_default,
|
|
8095
|
+
artifact: {
|
|
8096
|
+
role: "canonical-schema",
|
|
8097
|
+
source: {
|
|
8098
|
+
repository: repository$1,
|
|
8099
|
+
path: "schemas/protected-routes.schema.json"
|
|
8100
|
+
}
|
|
8101
|
+
}
|
|
8102
|
+
}],
|
|
8103
|
+
provenance: {
|
|
8104
|
+
canonicalSources: [
|
|
8105
|
+
source,
|
|
8106
|
+
{
|
|
8107
|
+
repository: repository$1,
|
|
8108
|
+
path: "schemas/protected-routes.schema.json"
|
|
8109
|
+
},
|
|
8110
|
+
{
|
|
8111
|
+
repository: repository$1,
|
|
8112
|
+
path: "src/extension.ts",
|
|
8113
|
+
symbol: opcode
|
|
8114
|
+
}
|
|
8115
|
+
],
|
|
8116
|
+
generatedFiles: [],
|
|
8117
|
+
referenceSchemas: [],
|
|
8118
|
+
generationSources: []
|
|
8119
|
+
}
|
|
8120
|
+
};
|
|
8121
|
+
}
|
|
8122
|
+
var extensionId = "kubohiroyacloudflareworker";
|
|
8123
|
+
var repository = "turbowarp-cloudflare-worker";
|
|
8124
|
+
var fields = [
|
|
8125
|
+
{
|
|
8126
|
+
"opcode": "createHandlerIr",
|
|
8127
|
+
"argument": "METHOD",
|
|
8128
|
+
"control": "enum",
|
|
8129
|
+
"choices": [
|
|
8130
|
+
"GET",
|
|
8131
|
+
"POST",
|
|
8132
|
+
"PUT",
|
|
8133
|
+
"PATCH",
|
|
8134
|
+
"DELETE",
|
|
8135
|
+
"OPTIONS",
|
|
8136
|
+
"HEAD"
|
|
8137
|
+
],
|
|
8138
|
+
"normalization": "method",
|
|
8139
|
+
"shape": "text.TEXT",
|
|
8140
|
+
"maxBytes": false
|
|
8141
|
+
},
|
|
8142
|
+
{
|
|
8143
|
+
"opcode": "createProtectedRouteIr",
|
|
8144
|
+
"argument": "METHOD",
|
|
8145
|
+
"control": "enum",
|
|
8146
|
+
"choices": [
|
|
8147
|
+
"GET",
|
|
8148
|
+
"POST",
|
|
8149
|
+
"PUT",
|
|
8150
|
+
"PATCH",
|
|
8151
|
+
"DELETE",
|
|
8152
|
+
"OPTIONS",
|
|
8153
|
+
"HEAD",
|
|
8154
|
+
"*"
|
|
8155
|
+
],
|
|
8156
|
+
"normalization": "method",
|
|
8157
|
+
"shape": "text.TEXT",
|
|
8158
|
+
"maxBytes": false
|
|
8159
|
+
},
|
|
8160
|
+
{
|
|
8161
|
+
"opcode": "createProtectedRouteIr",
|
|
8162
|
+
"argument": "ON_UNAUTHENTICATED",
|
|
8163
|
+
"control": "enum",
|
|
8164
|
+
"choices": [
|
|
8165
|
+
"redirect-login",
|
|
8166
|
+
"json-401",
|
|
8167
|
+
"forbid-403"
|
|
8168
|
+
],
|
|
8169
|
+
"normalization": "trim",
|
|
8170
|
+
"shape": "text.TEXT",
|
|
8171
|
+
"maxBytes": false
|
|
8172
|
+
},
|
|
8173
|
+
{
|
|
8174
|
+
"opcode": "createBearerRouteIr",
|
|
8175
|
+
"argument": "METHOD",
|
|
8176
|
+
"control": "enum",
|
|
8177
|
+
"choices": [
|
|
8178
|
+
"GET",
|
|
8179
|
+
"POST",
|
|
8180
|
+
"PUT",
|
|
8181
|
+
"PATCH",
|
|
8182
|
+
"DELETE",
|
|
8183
|
+
"OPTIONS",
|
|
8184
|
+
"HEAD",
|
|
8185
|
+
"*"
|
|
8186
|
+
],
|
|
8187
|
+
"normalization": "method",
|
|
8188
|
+
"shape": "text.TEXT",
|
|
8189
|
+
"maxBytes": false
|
|
8190
|
+
},
|
|
8191
|
+
{
|
|
8192
|
+
"opcode": "createBearerRoleRouteIr",
|
|
8193
|
+
"argument": "METHOD",
|
|
8194
|
+
"control": "enum",
|
|
8195
|
+
"choices": [
|
|
8196
|
+
"GET",
|
|
8197
|
+
"POST",
|
|
8198
|
+
"PUT",
|
|
8199
|
+
"PATCH",
|
|
8200
|
+
"DELETE",
|
|
8201
|
+
"OPTIONS",
|
|
8202
|
+
"HEAD",
|
|
8203
|
+
"*"
|
|
8204
|
+
],
|
|
8205
|
+
"normalization": "method",
|
|
8206
|
+
"shape": "text.TEXT",
|
|
8207
|
+
"maxBytes": false
|
|
8208
|
+
},
|
|
8209
|
+
{
|
|
8210
|
+
"opcode": "createBearerScopeRouteIr",
|
|
8211
|
+
"argument": "METHOD",
|
|
8212
|
+
"control": "enum",
|
|
8213
|
+
"choices": [
|
|
8214
|
+
"GET",
|
|
8215
|
+
"POST",
|
|
8216
|
+
"PUT",
|
|
8217
|
+
"PATCH",
|
|
8218
|
+
"DELETE",
|
|
8219
|
+
"OPTIONS",
|
|
8220
|
+
"HEAD",
|
|
8221
|
+
"*"
|
|
8222
|
+
],
|
|
8223
|
+
"normalization": "method",
|
|
8224
|
+
"shape": "text.TEXT",
|
|
8225
|
+
"maxBytes": false
|
|
8226
|
+
}
|
|
8227
|
+
];
|
|
8228
|
+
function literalString(value) {
|
|
8229
|
+
if (typeof value !== "string") throw new TypeError("Expected a string literal.");
|
|
8230
|
+
return value;
|
|
8231
|
+
}
|
|
8232
|
+
/** Legacy nonempty finite aliases are projections; opening never creates a write. */
|
|
8233
|
+
function existingFixedNumber(value) {
|
|
8234
|
+
if (typeof value !== "string" && typeof value !== "number" || typeof value === "string" && value.trim() === "") throw new TypeError("Unavailable numeric projection.");
|
|
8235
|
+
const number = Number(value);
|
|
8236
|
+
if (!Number.isFinite(number)) throw new TypeError("Unavailable numeric projection.");
|
|
8237
|
+
return number;
|
|
8238
|
+
}
|
|
8239
|
+
function normalizeChoice(field, raw) {
|
|
8240
|
+
if (field.normalization === "lowercase") return raw.toLowerCase();
|
|
8241
|
+
if (field.normalization === "method") return raw.trim().toUpperCase();
|
|
8242
|
+
if (field.normalization === "trim") return raw.trim();
|
|
8243
|
+
if (field.normalization === "parse-format") {
|
|
8244
|
+
const lower = raw.trim().toLowerCase();
|
|
8245
|
+
return lower === "json" ? "JSON" : lower === "yaml" ? "YAML" : lower === "auto" ? "auto" : raw;
|
|
8246
|
+
}
|
|
8247
|
+
return raw;
|
|
8248
|
+
}
|
|
8249
|
+
function binding(field) {
|
|
8250
|
+
return {
|
|
8251
|
+
argument: field.argument,
|
|
8252
|
+
schemaBundle: fixedInputBundle(field.opcode, field.argument),
|
|
8253
|
+
control: {
|
|
8254
|
+
kind: field.control,
|
|
8255
|
+
...field.control === "enum" ? { choices: field.choices.map((value) => ({ value })) } : {}
|
|
8256
|
+
},
|
|
8257
|
+
read(value) {
|
|
8258
|
+
return field.control === "number" ? existingFixedNumber(value) : normalizeChoice(field, literalString(value));
|
|
8259
|
+
},
|
|
8260
|
+
encode(value) {
|
|
8261
|
+
if (field.control === "number") {
|
|
8262
|
+
const parsed = parseFixedNumberInput(value);
|
|
8263
|
+
if (parsed.kind !== "valid") throw new TypeError("Invalid new numeric input.");
|
|
8264
|
+
return parsed.token;
|
|
8265
|
+
}
|
|
8266
|
+
const raw = literalString(value), normalized = normalizeChoice(field, raw);
|
|
8267
|
+
if (!field.choices.includes(normalized)) throw new TypeError("Unsupported fixed choice.");
|
|
8268
|
+
return field.shape === "menu-shadow" || field.shape === "direct-field-dropdown" ? normalized : raw;
|
|
8269
|
+
},
|
|
8270
|
+
validateCandidate(value) {
|
|
8271
|
+
try {
|
|
8272
|
+
if (field.control === "number") {
|
|
8273
|
+
const number = existingFixedNumber(value);
|
|
8274
|
+
if (field.maxBytes && (!Number.isSafeInteger(Math.trunc(number)) || Math.trunc(number) < 1)) return [{ message: "Invalid named body size." }];
|
|
8275
|
+
return [];
|
|
8276
|
+
}
|
|
8277
|
+
return field.choices.includes(normalizeChoice(field, literalString(value))) ? [] : [{ message: "Unsupported fixed choice." }];
|
|
8278
|
+
} catch {
|
|
8279
|
+
return [{ message: "Invalid fixed input." }];
|
|
8280
|
+
}
|
|
8281
|
+
}
|
|
8282
|
+
};
|
|
8283
|
+
}
|
|
8284
|
+
var fixedInputEditors = [...new Set(fields.map((f) => f.opcode))].map((opcode) => ({
|
|
8285
|
+
apiVersion: 1,
|
|
8286
|
+
extensionId,
|
|
8287
|
+
editorId: `${opcode}-fixed-inputs`,
|
|
8288
|
+
opcodes: [`${extensionId}_${opcode}`],
|
|
8289
|
+
contractId: `${repository}/${opcode}`,
|
|
8290
|
+
contractRevision: "fixed-inputs-v1",
|
|
8291
|
+
bindings: fields.filter((field) => field.opcode === opcode).map(binding),
|
|
8292
|
+
validationContext: () => ({
|
|
8293
|
+
consumerId: repository,
|
|
8294
|
+
nowMs: 0,
|
|
8295
|
+
settings: null
|
|
8296
|
+
})
|
|
8297
|
+
}));
|
|
8298
|
+
/** Registration follows the advertised opcode membership and the optional host capability. */
|
|
8299
|
+
function fixedInputRegistration(scratch) {
|
|
8300
|
+
const host = scratch ?? {};
|
|
8301
|
+
let active;
|
|
8302
|
+
let membership = "";
|
|
8303
|
+
const removers = [];
|
|
8304
|
+
let stopped = false;
|
|
8305
|
+
const clear = () => {
|
|
8306
|
+
host.vm?.runtime?.off?.("RUNTIME_DISPOSED", shutdown);
|
|
8307
|
+
for (const remove of removers.splice(0).reverse()) remove();
|
|
8308
|
+
active = void 0;
|
|
8309
|
+
membership = "";
|
|
8310
|
+
};
|
|
8311
|
+
const shutdown = () => {
|
|
8312
|
+
stopped = true;
|
|
8313
|
+
clear();
|
|
8314
|
+
};
|
|
8315
|
+
return {
|
|
8316
|
+
ensure(visibleOpcodes) {
|
|
8317
|
+
const api = host.gui?.blockEditors;
|
|
8318
|
+
const definitions = fixedInputEditors.filter((definition) => definition.opcodes.every((opcode) => visibleOpcodes.includes(opcode)));
|
|
8319
|
+
const key = definitions.map((definition) => definition.editorId).join(",");
|
|
8320
|
+
if (stopped || api === active && membership === key) return;
|
|
8321
|
+
clear();
|
|
8322
|
+
if (api?.apiVersion !== 1 || typeof api.registerFixedInputEditor !== "function" || !definitions.length) return;
|
|
8323
|
+
try {
|
|
8324
|
+
for (const definition of definitions) {
|
|
8325
|
+
const remove = api.registerFixedInputEditor.call(api, definition);
|
|
8326
|
+
if (typeof remove !== "function") throw new TypeError("Invalid fixed input cleanup.");
|
|
8327
|
+
removers.push(remove);
|
|
8328
|
+
}
|
|
8329
|
+
active = api;
|
|
8330
|
+
membership = key;
|
|
8331
|
+
host.vm?.runtime?.on?.("RUNTIME_DISPOSED", shutdown);
|
|
8332
|
+
} catch (error) {
|
|
8333
|
+
clear();
|
|
8334
|
+
throw error;
|
|
8335
|
+
}
|
|
8336
|
+
},
|
|
8337
|
+
dispose: shutdown
|
|
8338
|
+
};
|
|
8339
|
+
}
|
|
7864
8340
|
function canonicalBundle(ownerId, contractId, document, ownerSource) {
|
|
7865
8341
|
const source = {
|
|
7866
8342
|
repository: ownerId,
|
|
@@ -8173,82 +8649,6 @@
|
|
|
8173
8649
|
}
|
|
8174
8650
|
}
|
|
8175
8651
|
};
|
|
8176
|
-
var protected_routes_schema_default = {
|
|
8177
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
8178
|
-
$id: "https://kubohiroya.github.io/turbowarp-http-server-cloudflare/schemas/protected-routes.schema.json",
|
|
8179
|
-
anyOf: [{
|
|
8180
|
-
"type": "object",
|
|
8181
|
-
"required": [
|
|
8182
|
-
"method",
|
|
8183
|
-
"path",
|
|
8184
|
-
"onUnauthenticated"
|
|
8185
|
-
],
|
|
8186
|
-
"properties": {
|
|
8187
|
-
"method": {
|
|
8188
|
-
"type": "string",
|
|
8189
|
-
"minLength": 1
|
|
8190
|
-
},
|
|
8191
|
-
"path": {
|
|
8192
|
-
"type": "string",
|
|
8193
|
-
"minLength": 1
|
|
8194
|
-
},
|
|
8195
|
-
"onUnauthenticated": { "enum": [
|
|
8196
|
-
"redirect-login",
|
|
8197
|
-
"json-401",
|
|
8198
|
-
"forbid-403"
|
|
8199
|
-
] },
|
|
8200
|
-
"auth": { "enum": ["session", "bearer-jwt"] },
|
|
8201
|
-
"requiredRole": {
|
|
8202
|
-
"type": "string",
|
|
8203
|
-
"minLength": 1
|
|
8204
|
-
},
|
|
8205
|
-
"requiredScopes": {
|
|
8206
|
-
"type": "array",
|
|
8207
|
-
"items": {
|
|
8208
|
-
"type": "string",
|
|
8209
|
-
"minLength": 1
|
|
8210
|
-
}
|
|
8211
|
-
}
|
|
8212
|
-
}
|
|
8213
|
-
}, {
|
|
8214
|
-
"type": "array",
|
|
8215
|
-
"items": {
|
|
8216
|
-
"type": "object",
|
|
8217
|
-
"required": [
|
|
8218
|
-
"method",
|
|
8219
|
-
"path",
|
|
8220
|
-
"onUnauthenticated"
|
|
8221
|
-
],
|
|
8222
|
-
"properties": {
|
|
8223
|
-
"method": {
|
|
8224
|
-
"type": "string",
|
|
8225
|
-
"minLength": 1
|
|
8226
|
-
},
|
|
8227
|
-
"path": {
|
|
8228
|
-
"type": "string",
|
|
8229
|
-
"minLength": 1
|
|
8230
|
-
},
|
|
8231
|
-
"onUnauthenticated": { "enum": [
|
|
8232
|
-
"redirect-login",
|
|
8233
|
-
"json-401",
|
|
8234
|
-
"forbid-403"
|
|
8235
|
-
] },
|
|
8236
|
-
"auth": { "enum": ["session", "bearer-jwt"] },
|
|
8237
|
-
"requiredRole": {
|
|
8238
|
-
"type": "string",
|
|
8239
|
-
"minLength": 1
|
|
8240
|
-
},
|
|
8241
|
-
"requiredScopes": {
|
|
8242
|
-
"type": "array",
|
|
8243
|
-
"items": {
|
|
8244
|
-
"type": "string",
|
|
8245
|
-
"minLength": 1
|
|
8246
|
-
}
|
|
8247
|
-
}
|
|
8248
|
-
}
|
|
8249
|
-
}
|
|
8250
|
-
}]
|
|
8251
|
-
};
|
|
8252
8652
|
var auth_ir_schema_default = {
|
|
8253
8653
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
8254
8654
|
$id: "https://kubohiroya.github.io/turbowarp-http-server-cloudflare/schemas/auth-ir.schema.json",
|
|
@@ -9482,12 +9882,15 @@
|
|
|
9482
9882
|
var authBlockIconUri = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCI+PHJlY3QgeD0iNiIgeT0iMTgiIHdpZHRoPSIzNiIgaGVpZ2h0PSIyNCIgcng9IjQiIGZpbGw9IiNGNzk1MjEiLz48cGF0aCBkPSJNMTUgMTh2LTZjMC01IDQtOSA5LTlzOSA0IDkgOXY2IiBmaWxsPSJub25lIiBzdHJva2U9IiMxRjI5MzciIHN0cm9rZS13aWR0aD0iNCIvPjxjaXJjbGUgY3g9IjI0IiBjeT0iMzAiIHI9IjMiIGZpbGw9IiMxRjI5MzciLz48L3N2Zz4=";
|
|
9483
9883
|
var CloudflareExtension = class {
|
|
9484
9884
|
constructor() {
|
|
9885
|
+
this.fixedInputs = fixedInputRegistration(typeof Scratch === "undefined" ? void 0 : Scratch);
|
|
9485
9886
|
this.unregisterSourceEditors = registerSourceEditors(Scratch, sourceEditorDefinitions);
|
|
9486
9887
|
}
|
|
9487
9888
|
dispose() {
|
|
9889
|
+
this.fixedInputs.dispose();
|
|
9488
9890
|
this.unregisterSourceEditors();
|
|
9489
9891
|
}
|
|
9490
9892
|
getInfo() {
|
|
9893
|
+
this.fixedInputs.ensure(paletteDefinitions.flatMap((block) => "opcode" in block ? [`${extensionConfig.id}_${block.opcode}`] : []));
|
|
9491
9894
|
return {
|
|
9492
9895
|
id: extensionConfig.id,
|
|
9493
9896
|
name: Scratch.translate(block_definitions_default.extensionName),
|