Skip to content

Commit 7252fb8

Browse files
committed
Address handle issue when extension name contains dashes
1 parent 338f41f commit 7252fb8

File tree

7 files changed

+54
-41
lines changed

7 files changed

+54
-41
lines changed

order-routing/javascript/pickup-point-delivery-option-generators/default/package.json.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "{{name | replace: " ", "-" | downcase}}",
2+
"name": "{{handle}}",
33
"version": "0.0.1",
44
"license": "UNLICENSED",
55
"scripts": {
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
api_version = "unstable"
22

33
[[extensions]]
4-
handle = "{{name | replace: " ", "-" | downcase}}"
4+
handle = "{{handle}}"
55
name = "{{name}}"
66
type = "function"
77

8-
[[extensions.targeting]]
9-
target = "purchase.pickup-point-delivery-option-generator.fetch"
10-
input_query = "src/fetch.graphql"
11-
export = "fetch"
8+
[[extensions.targeting]]
9+
target = "purchase.pickup-point-delivery-option-generator.fetch"
10+
input_query = "src/fetch.graphql"
11+
export = "fetch"
1212

13-
[[extensions.targeting]]
14-
target = "purchase.pickup-point-delivery-option-generator.run"
15-
input_query = "src/run.graphql"
16-
export = "run"
13+
[[extensions.targeting]]
14+
target = "purchase.pickup-point-delivery-option-generator.run"
15+
input_query = "src/run.graphql"
16+
export = "run"
1717

18-
[extensions.build]
19-
command = ""
20-
path = "dist/function.wasm"
18+
[extensions.build]
19+
command = ""
20+
path = "dist/function.wasm"
2121

22-
[extensions.ui.paths]
23-
create = "/"
24-
details = "/"
22+
[extensions.ui.paths]
23+
create = "/"
24+
details = "/"

order-routing/rust/pickup-point-delivery-option-generators/default/Cargo.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "{{name | replace: " ", "-" | downcase}}"
2+
name = "{{handle}}"
33
version = "1.0.0"
44
edition = "2021"
55
rust-version = "1.62"

order-routing/rust/pickup-point-delivery-option-generators/default/shopify.extension.toml.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
api_version = "unstable"
22

33
[[extensions]]
4-
handle = "{{name | replace: " ", "-" | downcase}}"
4+
handle = "{{handle}}"
55
name = "{{name}}"
66
type = "function"
77

@@ -17,7 +17,7 @@ export = "run"
1717

1818
[extensions.build]
1919
command = "cargo wasi build --release"
20-
path = "target/wasm32-wasi/release/{{name | replace: " ", "_" | downcase}}.wasm"
20+
path = "target/wasm32-wasi/release/{{handle | replace: "-", "_" | downcase}}.wasm"
2121
watch = ["src/**/*.rs"]
2222

2323
[extensions.ui.paths]

order-routing/typescript/pickup-point-delivery-option-generators/default/package.json.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "{{name | replace: " ", "-" | downcase}}",
2+
"name": "{{handle}}",
33
"version": "0.0.1",
44
"license": "UNLICENSED",
55
"scripts": {
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
api_version = "unstable"
22

33
[[extensions]]
4-
handle = "{{name | replace: " ", "-" | downcase}}"
4+
handle = "{{handle}}"
55
name = "{{name}}"
66
type = "function"
77

8-
[[extensions.targeting]]
9-
target = "purchase.pickup-point-delivery-option-generator.fetch"
10-
input_query = "src/fetch.graphql"
11-
export = "fetch"
8+
[[extensions.targeting]]
9+
target = "purchase.pickup-point-delivery-option-generator.fetch"
10+
input_query = "src/fetch.graphql"
11+
export = "fetch"
1212

13-
[[extensions.targeting]]
14-
target = "purchase.pickup-point-delivery-option-generator.run"
15-
input_query = "src/run.graphql"
16-
export = "run"
13+
[[extensions.targeting]]
14+
target = "purchase.pickup-point-delivery-option-generator.run"
15+
input_query = "src/run.graphql"
16+
export = "run"
1717

18-
[extensions.build]
19-
command = ""
20-
path = "dist/function.wasm"
18+
[extensions.build]
19+
command = ""
20+
path = "dist/function.wasm"
2121

22-
[extensions.ui.paths]
23-
create = "/"
24-
details = "/"
22+
[extensions.ui.paths]
23+
create = "/"
24+
details = "/"
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1+
api_version = "unstable"
2+
3+
[[extensions]]
4+
handle = "{{handle}}"
15
name = "{{name}}"
26
type = "function"
3-
api_version = "unstable"
47

5-
[build]
6-
command = "echo 'build the wasm'"
8+
[[extensions.targeting]]
9+
target = "purchase.pickup-point-delivery-option-generator.fetch"
10+
input_query = "src/fetch.graphql"
11+
export = "fetch"
12+
13+
[[extensions.targeting]]
14+
target = "purchase.pickup-point-delivery-option-generator.run"
15+
input_query = "src/run.graphql"
16+
export = "run"
17+
18+
[extensions.build]
19+
command = "echo 'build the wasm'"
720

8-
[ui.paths]
9-
create = "/"
10-
details = "/"
21+
[extensions.ui.paths]
22+
create = "/"
23+
details = "/"

0 commit comments

Comments
 (0)