shopify-cli 1.8.0 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  3. data/.github/workflows/build.yml +28 -0
  4. data/.rubocop_todo.yml +15 -2
  5. data/CHANGELOG.md +24 -1
  6. data/Gemfile.lock +4 -4
  7. data/README.md +2 -1
  8. data/dev.yml +3 -0
  9. data/lib/graphql/extension_create.graphql +17 -2
  10. data/lib/project_types/extension/cli.rb +8 -0
  11. data/lib/project_types/extension/commands/extension_command.rb +4 -4
  12. data/lib/project_types/extension/commands/push.rb +2 -2
  13. data/lib/project_types/extension/commands/register.rb +4 -3
  14. data/lib/project_types/extension/commands/serve.rb +62 -28
  15. data/lib/project_types/extension/commands/tunnel.rb +3 -1
  16. data/lib/project_types/extension/extension_project.rb +16 -4
  17. data/lib/project_types/extension/extension_project_keys.rb +2 -1
  18. data/lib/project_types/extension/features/argo.rb +19 -44
  19. data/lib/project_types/extension/features/argo_runtime.rb +84 -0
  20. data/lib/project_types/extension/features/argo_serve.rb +80 -0
  21. data/lib/project_types/extension/features/argo_serve_options.rb +41 -0
  22. data/lib/project_types/extension/features/argo_setup.rb +1 -1
  23. data/lib/project_types/extension/messages/message_loading.rb +3 -1
  24. data/lib/project_types/extension/messages/messages.rb +5 -4
  25. data/lib/project_types/extension/models/npm_package.rb +14 -0
  26. data/lib/project_types/extension/models/registration.rb +1 -0
  27. data/lib/project_types/extension/models/specification.rb +3 -0
  28. data/lib/project_types/extension/models/specification_handlers/checkout_argo_extension.rb +18 -0
  29. data/lib/project_types/extension/models/specification_handlers/default.rb +49 -1
  30. data/lib/project_types/extension/models/version.rb +1 -1
  31. data/lib/project_types/extension/tasks/choose_next_available_port.rb +36 -0
  32. data/lib/project_types/extension/tasks/configure_features.rb +4 -0
  33. data/lib/project_types/extension/tasks/converters/registration_converter.rb +2 -0
  34. data/lib/project_types/extension/tasks/find_npm_packages.rb +106 -0
  35. data/lib/project_types/node/commands/generate.rb +0 -22
  36. data/lib/project_types/node/messages/messages.rb +4 -4
  37. data/lib/project_types/rails/messages/messages.rb +4 -4
  38. data/lib/project_types/script/cli.rb +7 -8
  39. data/lib/project_types/script/commands/create.rb +0 -7
  40. data/lib/project_types/script/commands/push.rb +3 -3
  41. data/lib/project_types/script/config/extension_points.yml +4 -0
  42. data/lib/project_types/script/errors.rb +0 -19
  43. data/lib/project_types/script/forms/create.rb +3 -14
  44. data/lib/project_types/script/graphql/app_script_update_or_create.graphql +5 -5
  45. data/lib/project_types/script/graphql/get_app_scripts.graphql +6 -0
  46. data/lib/project_types/script/graphql/script_service_proxy.graphql +1 -2
  47. data/lib/project_types/script/layers/application/build_script.rb +1 -2
  48. data/lib/project_types/script/layers/application/create_script.rb +30 -51
  49. data/lib/project_types/script/layers/application/extension_points.rb +3 -2
  50. data/lib/project_types/script/layers/application/push_script.rb +5 -5
  51. data/lib/project_types/script/layers/domain/errors.rb +0 -2
  52. data/lib/project_types/script/layers/domain/extension_point.rb +56 -46
  53. data/lib/project_types/script/layers/domain/metadata.rb +18 -25
  54. data/lib/project_types/script/layers/domain/push_package.rb +4 -4
  55. data/lib/project_types/script/layers/domain/script_project.rb +54 -0
  56. data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +15 -16
  57. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +13 -7
  58. data/lib/project_types/script/layers/infrastructure/command_runner.rb +19 -0
  59. data/lib/project_types/script/layers/infrastructure/errors.rb +40 -11
  60. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +12 -13
  61. data/lib/project_types/script/layers/infrastructure/rust_project_creator.rb +9 -10
  62. data/lib/project_types/script/layers/infrastructure/rust_task_runner.rb +6 -7
  63. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +172 -0
  64. data/lib/project_types/script/layers/infrastructure/script_service.rb +21 -72
  65. data/lib/project_types/script/messages/messages.rb +20 -50
  66. data/lib/project_types/script/tasks/ensure_env.rb +85 -0
  67. data/lib/project_types/script/ui/error_handler.rb +32 -30
  68. data/lib/shopify-cli/context.rb +28 -0
  69. data/lib/shopify-cli/js_system.rb +2 -2
  70. data/lib/shopify-cli/messages/messages.rb +50 -45
  71. data/lib/shopify-cli/method_object.rb +4 -4
  72. data/lib/shopify-cli/oauth.rb +9 -3
  73. data/lib/shopify-cli/packager.rb +1 -1
  74. data/lib/shopify-cli/partners_api/organizations.rb +3 -3
  75. data/lib/shopify-cli/resolve_constant.rb +1 -1
  76. data/lib/shopify-cli/resources/env_file.rb +1 -1
  77. data/lib/shopify-cli/shopifolk.rb +1 -1
  78. data/lib/shopify-cli/tasks/select_org_and_shop.rb +6 -4
  79. data/lib/shopify-cli/transform_data_structure.rb +1 -1
  80. data/lib/shopify-cli/tunnel.rb +22 -1
  81. data/lib/shopify-cli/version.rb +1 -1
  82. data/lib/shopify_cli.rb +0 -1
  83. data/vendor/deps/smart_properties/REVISION +1 -1
  84. data/vendor/deps/smart_properties/lib/smart_properties/property.rb +7 -1
  85. data/vendor/deps/smart_properties/lib/smart_properties/version.rb +1 -1
  86. metadata +16 -12
  87. data/.travis.yml +0 -14
  88. data/lib/project_types/script/commands/disable.rb +0 -25
  89. data/lib/project_types/script/commands/enable.rb +0 -80
  90. data/lib/project_types/script/graphql/shop_script_delete.graphql +0 -14
  91. data/lib/project_types/script/graphql/shop_script_update_or_create.graphql +0 -28
  92. data/lib/project_types/script/layers/application/disable_script.rb +0 -21
  93. data/lib/project_types/script/layers/application/enable_script.rb +0 -23
  94. data/lib/project_types/script/layers/infrastructure/config_ui_repository.rb +0 -46
  95. data/lib/project_types/script/script_project.rb +0 -64
@@ -0,0 +1,172 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Script
4
+ module Layers
5
+ module Infrastructure
6
+ class ScriptProjectRepository
7
+ include SmartProperties
8
+ property! :ctx, accepts: ShopifyCli::Context
9
+
10
+ DEFAULT_CONFIG_UI_FILENAME = "config-ui.yml"
11
+ MUTABLE_ENV_VALUES = %i(uuid)
12
+
13
+ def create(script_name:, extension_point_type:, language:, no_config_ui:)
14
+ validate_metadata!(extension_point_type, language)
15
+
16
+ config_ui_file = nil
17
+ optional_identifiers = {}
18
+ optional_identifiers.merge!(config_ui_file: DEFAULT_CONFIG_UI_FILENAME) unless no_config_ui
19
+
20
+ ShopifyCli::Project.write(
21
+ ctx,
22
+ project_type: :script,
23
+ organization_id: nil,
24
+ extension_point_type: extension_point_type,
25
+ script_name: script_name,
26
+ language: language,
27
+ **optional_identifiers
28
+ )
29
+
30
+ Domain::ScriptProject.new(
31
+ id: ctx.root,
32
+ env: project.env,
33
+ script_name: script_name,
34
+ extension_point_type: extension_point_type,
35
+ language: language,
36
+ config_ui: config_ui_file
37
+ )
38
+ end
39
+
40
+ def get
41
+ validate_metadata!(extension_point_type, language)
42
+
43
+ config_ui = ConfigUiRepository.new(ctx: ctx).get(config_ui_file)
44
+
45
+ Domain::ScriptProject.new(
46
+ id: project.directory,
47
+ env: project.env,
48
+ script_name: script_name,
49
+ extension_point_type: extension_point_type,
50
+ language: language,
51
+ config_ui: config_ui
52
+ )
53
+ end
54
+
55
+ def update_env(**args)
56
+ capture_io do
57
+ args.slice(*MUTABLE_ENV_VALUES).each do |key, value|
58
+ project.env.extra[key.to_s.upcase] = value
59
+ project.env.update(ctx, :extra, project.env.extra)
60
+ end
61
+ end
62
+
63
+ Domain::ScriptProject.new(
64
+ id: ctx.root,
65
+ env: project.env,
66
+ script_name: script_name,
67
+ extension_point_type: extension_point_type,
68
+ language: language,
69
+ config_ui: ConfigUiRepository.new(ctx: ctx).get(config_ui_file),
70
+ )
71
+ end
72
+
73
+ def create_env(api_key:, secret:, uuid:)
74
+ ShopifyCli::Resources::EnvFile.new(
75
+ api_key: api_key,
76
+ secret: secret,
77
+ extra: {
78
+ Domain::ScriptProject::UUID_ENV_KEY => uuid,
79
+ }
80
+ ).write(ctx)
81
+
82
+ Domain::ScriptProject.new(
83
+ id: ctx.root,
84
+ env: project.env,
85
+ script_name: script_name,
86
+ extension_point_type: extension_point_type,
87
+ language: language,
88
+ config_ui: ConfigUiRepository.new(ctx: ctx).get(config_ui_file),
89
+ )
90
+ end
91
+
92
+ private
93
+
94
+ def capture_io(&block)
95
+ CLI::UI::StdoutRouter::Capture.new(&block).run
96
+ end
97
+
98
+ def extension_point_type
99
+ project_config_value!("extension_point_type")
100
+ end
101
+
102
+ def script_name
103
+ project_config_value!("script_name")
104
+ end
105
+
106
+ def config_ui_file
107
+ project_config_value("config_ui_file")
108
+ end
109
+
110
+ def language
111
+ project_config_value("language")&.downcase || default_language
112
+ end
113
+
114
+ def project_config_value(key)
115
+ return nil unless project.config.key?(key)
116
+ project.config[key]
117
+ end
118
+
119
+ def project_config_value!(key)
120
+ raise Errors::InvalidContextError, key unless project.config.key?(key)
121
+ project.config[key]
122
+ end
123
+
124
+ def project
125
+ @project ||= ShopifyCli::Project.current(force_reload: true)
126
+ end
127
+
128
+ def default_language
129
+ Domain::ExtensionPoint::ExtensionPointAssemblyScriptSDK.language
130
+ end
131
+
132
+ def validate_metadata!(extension_point_type, language)
133
+ if Application::ExtensionPoints.deprecated_types.include?(extension_point_type)
134
+ raise Errors::DeprecatedEPError, extension_point_type
135
+ elsif !Application::ExtensionPoints.supported_language?(type: extension_point_type, language: language)
136
+ raise Errors::InvalidLanguageError.new(language, extension_point_type)
137
+ end
138
+ end
139
+
140
+ class ConfigUiRepository
141
+ include SmartProperties
142
+ property! :ctx, accepts: ShopifyCli::Context
143
+
144
+ def get(filename)
145
+ return nil unless filename
146
+
147
+ path = File.join(ctx.root, filename)
148
+ raise Domain::Errors::MissingSpecifiedConfigUiDefinitionError, filename unless File.exist?(path)
149
+
150
+ content = File.read(path)
151
+ raise Domain::Errors::InvalidConfigUiDefinitionError, filename unless valid_config_ui?(content)
152
+
153
+ Domain::ConfigUi.new(
154
+ filename: filename,
155
+ content: content,
156
+ )
157
+ end
158
+
159
+ private
160
+
161
+ def valid_config_ui?(raw_yaml)
162
+ require "yaml" # takes 20ms, so deferred as late as possible.
163
+ YAML.safe_load(raw_yaml)
164
+ true
165
+ rescue Psych::SyntaxError
166
+ false
167
+ end
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
@@ -11,11 +11,11 @@ module Script
11
11
  property! :ctx, accepts: ShopifyCli::Context
12
12
 
13
13
  def push(
14
+ uuid:,
14
15
  extension_point_type:,
15
16
  script_name:,
16
17
  script_content:,
17
18
  compiled_type:,
18
- description: nil,
19
19
  api_key: nil,
20
20
  force: false,
21
21
  metadata:,
@@ -23,9 +23,9 @@ module Script
23
23
  )
24
24
  query_name = "app_script_update_or_create"
25
25
  variables = {
26
+ uuid: uuid,
26
27
  extensionPointName: extension_point_type.upcase,
27
28
  title: script_name,
28
- description: description,
29
29
  configUi: config_ui&.content,
30
30
  sourceCode: Base64.encode64(script_content),
31
31
  language: compiled_type,
@@ -37,104 +37,53 @@ module Script
37
37
  resp_hash = script_service_request(query_name: query_name, api_key: api_key, variables: variables)
38
38
  user_errors = resp_hash["data"]["appScriptUpdateOrCreate"]["userErrors"]
39
39
 
40
- return resp_hash if user_errors.empty?
40
+ return resp_hash["data"]["appScriptUpdateOrCreate"]["appScript"]["uuid"] if user_errors.empty?
41
41
 
42
42
  if user_errors.any? { |e| e["tag"] == "already_exists_error" }
43
- raise Errors::ScriptRepushError, api_key
43
+ raise Errors::ScriptRepushError, uuid
44
44
  elsif (e = user_errors.any? { |err| err["tag"] == "config_ui_syntax_error" })
45
45
  raise Errors::ConfigUiSyntaxError, config_ui&.filename
46
46
  elsif (e = user_errors.find { |err| err["tag"] == "config_ui_missing_keys_error" })
47
47
  raise Errors::ConfigUiMissingKeysError.new(config_ui&.filename, e["message"])
48
+ elsif (e = user_errors.find { |err| err["tag"] == "config_ui_invalid_input_mode_error" })
49
+ raise Errors::ConfigUiInvalidInputModeError.new(config_ui&.filename, e["message"])
48
50
  elsif (e = user_errors.find { |err| err["tag"] == "config_ui_fields_missing_keys_error" })
49
51
  raise Errors::ConfigUiFieldsMissingKeysError.new(config_ui&.filename, e["message"])
52
+ elsif (e = user_errors.find { |err| err["tag"] == "config_ui_fields_invalid_type_error" })
53
+ raise Errors::ConfigUiFieldsInvalidTypeError.new(config_ui&.filename, e["message"])
54
+ elsif user_errors.find { |err| %w(not_use_msgpack_error schema_version_argument_error).include?(err["tag"]) }
55
+ raise Domain::Errors::MetadataValidationError
50
56
  else
51
- raise Errors::ScriptServiceUserError.new(query_name, user_errors.to_s)
57
+ raise Errors::GraphqlError, user_errors
52
58
  end
53
59
  end
54
60
 
55
- def enable(api_key:, shop_domain:, configuration:, extension_point_type:, title:)
56
- query_name = "shop_script_update_or_create"
57
- variables = {
58
- extensionPointName: extension_point_type.upcase,
59
- configuration: configuration,
60
- title: title,
61
- }
62
-
63
- resp_hash = script_service_request(
64
- query_name: query_name,
65
- api_key: api_key,
66
- shop_domain: format_shop_domain(shop_domain),
67
- variables: variables,
68
- )
69
- user_errors = resp_hash["data"]["shopScriptUpdateOrCreate"]["userErrors"]
70
-
71
- return resp_hash if user_errors.empty?
72
-
73
- if user_errors.any? { |e| e["tag"] == "app_script_not_found" }
74
- raise Errors::AppScriptUndefinedError, api_key
75
- elsif user_errors.any? { |e| e["tag"] == "shop_script_conflict" }
76
- raise Errors::ShopScriptConflictError
77
- elsif user_errors.any? { |e| e["tag"] == "app_script_not_pushed" }
78
- raise Errors::AppScriptNotPushedError
79
- else
80
- raise Errors::ScriptServiceUserError.new(query_name, user_errors.to_s)
81
- end
82
- end
83
-
84
- def disable(api_key:, shop_domain:, extension_point_type:)
85
- query_name = "shop_script_delete"
86
- variables = {
87
- extensionPointName: extension_point_type.upcase,
88
- }
89
-
90
- resp_hash = script_service_request(
91
- query_name: query_name,
92
- api_key: api_key,
93
- shop_domain: format_shop_domain(shop_domain),
94
- variables: variables,
95
- )
96
- user_errors = resp_hash["data"]["shopScriptDelete"]["userErrors"]
97
- return resp_hash if user_errors.empty?
98
-
99
- if user_errors.any? { |e| e["tag"] == "shop_script_not_found" }
100
- raise Errors::ShopScriptUndefinedError, api_key
101
- else
102
- raise Errors::ScriptServiceUserError.new(query_name, user_errors.to_s)
103
- end
61
+ def get_app_scripts(api_key:, extension_point_type:)
62
+ query_name = "get_app_scripts"
63
+ variables = { appKey: api_key, extensionPointName: extension_point_type.upcase }
64
+ script_service_request(query_name: query_name, api_key: api_key, variables: variables)["data"]["appScripts"]
104
65
  end
105
66
 
106
67
  private
107
68
 
108
- def format_shop_domain(shop_domain)
109
- shop_domain.delete_suffix("/")
110
- end
111
-
112
69
  class ScriptServiceAPI < ShopifyCli::API
113
70
  property(:api_key, accepts: String)
114
- property(:shop_id, accepts: Integer)
115
71
 
116
- def self.query(ctx, query_name, api_key: nil, shop_domain: nil, variables: {})
117
- api_client(ctx, api_key, shop_domain).query(query_name, variables: variables)
72
+ def self.query(ctx, query_name, api_key: nil, variables: {})
73
+ api_client(ctx, api_key).query(query_name, variables: variables)
118
74
  end
119
75
 
120
- def self.api_client(ctx, api_key, shop_domain)
76
+ def self.api_client(ctx, api_key)
121
77
  new(
122
78
  ctx: ctx,
123
79
  url: "https://script-service.myshopify.io/graphql",
124
80
  token: "",
125
- api_key: api_key,
126
- shop_id: infer_shop_id(shop_domain)
81
+ api_key: api_key
127
82
  )
128
83
  end
129
84
 
130
- def self.infer_shop_id(shop_domain)
131
- return unless shop_domain
132
-
133
- [shop_domain.to_i, 1].max
134
- end
135
-
136
85
  def auth_headers(*)
137
- tokens = { "APP_KEY" => api_key, "SHOP_ID" => shop_id }.compact.to_json
86
+ tokens = { "APP_KEY" => api_key }.compact.to_json
138
87
  { "X-Shopify-Authenticated-Tokens" => tokens }
139
88
  end
140
89
  end
@@ -177,7 +126,7 @@ module Script
177
126
  when "app_not_installed_on_shop"
178
127
  raise Errors::AppNotInstalledError
179
128
  else
180
- raise Errors::GraphqlError, response["errors"].map { |e| e["message"] }
129
+ raise Errors::GraphqlError, response["errors"]
181
130
  end
182
131
  end
183
132
 
@@ -64,17 +64,22 @@ module Script
64
64
  "%{missing_keys}.",
65
65
  config_ui_missing_keys_error_help: "Add the keys and try again.",
66
66
 
67
+ config_ui_invalid_input_mode_error_cause: "The UI configuration file %{filename} only accept "\
68
+ "one of the following input mode(s): %{valid_input_modes}.",
69
+ config_ui_invalid_input_mode_error_help: "Change the input modes and try again.",
70
+
67
71
  config_ui_fields_missing_keys_error_cause: "A field entry in the UI configuration file %{filename} is "\
68
72
  "missing required keys: %{missing_keys}.",
69
73
  config_ui_fields_missing_keys_error_help: "Add the keys and try again.",
70
74
 
71
- script_not_found_cause: "Couldn't find script %s for extension point %s",
75
+ config_ui_fields_invalid_type_error_cause: "The UI configuration file %{filename} fields only accept "\
76
+ "one of the following type(s): %{valid_types}.",
77
+ config_ui_fields_invalid_type_error_help: "Change the types and try again.",
72
78
 
73
- service_failure_cause: "Internal service error.",
74
- service_failure_help: "Ensure the 'shopify/scripts-toolchain-as' package is up to date.",
79
+ script_not_found_cause: "Couldn't find script %s for extension point %s",
75
80
 
76
- user_error_cause: "Invalid script extension metadata.",
77
- user_error_help: "Ensure the 'shopify/scripts-toolchain-as' package is up to date.",
81
+ system_call_failure_cause: "An error was returned while running {{command:%{cmd}}}.",
82
+ system_call_failure_help: "Review the following error and try again.\n{{red:%{out}}}",
78
83
 
79
84
  metadata_validation_cause: "Invalid script extension metadata.",
80
85
  metadata_validation_help: "Ensure the 'shopify/scripts-toolchain-as' package is up to date.",
@@ -94,8 +99,6 @@ module Script
94
99
  "'--metadata build/metadata.json' argument",
95
100
  app_not_installed_cause: "App not installed on store.",
96
101
 
97
- app_script_not_pushed_help: "Script isn't on the app. Run {{command:shopify push}}, and then try again.",
98
-
99
102
  build_error_cause: "Something went wrong while building the script.",
100
103
  build_error_help: "Correct the errors and try again.",
101
104
 
@@ -110,18 +113,12 @@ module Script
110
113
  graphql_error_cause: "An error was returned: %s.",
111
114
  graphql_error_help: "\nReview the error and try again.",
112
115
 
113
- script_repush_cause: "A script with the same extension point already exists on app (API key: %s).",
116
+ script_repush_cause: "A script with this UUID already exists (UUID: %s).",
114
117
  script_repush_help: "Use {{cyan:--force}} to replace the existing script.",
115
118
 
116
119
  shop_auth_cause: "Unable to authenticate with the store.",
117
120
  shop_auth_help: "Try again.",
118
121
 
119
- shop_script_conflict_cause: "Another app in this store has already enabled a script "\
120
- "on this extension point.",
121
- shop_script_conflict_help: "Disable that script or uninstall that app and try again.",
122
-
123
- shop_script_undefined_cause: "Script is already turned off in store.",
124
-
125
122
  invalid_build_script: "The root package.json contains an invalid build command that " \
126
123
  "is needed to compile your script to WebAssembly.",
127
124
  build_script_not_found: "The root package.json is missing the build command that " \
@@ -142,7 +139,6 @@ module Script
142
139
  Usage: {{command:%1$s create script}}
143
140
  Options:
144
141
  {{command:--name=NAME}} Script project name. Use any string.
145
- {{command:--description=DESCRIPTION}} Description of the project. Use any string.
146
142
  {{command:--extension-point=TYPE}} Extension point name. Allowed values: %2$s.
147
143
  {{command:--no-config-ui}} Specify this option if you don’t want Scripts to render an interface in the Shopify admin.
148
144
  HELP
@@ -171,40 +167,6 @@ module Script
171
167
  script_pushed: "{{v}} Script pushed to app (API key: %{api_key}).",
172
168
  },
173
169
 
174
- disable: {
175
- help: <<~HELP,
176
- Turn off script in store.
177
- Usage: {{command:%s disable}}
178
- HELP
179
-
180
- error: {
181
- operation_failed: "Can't disable script.",
182
- },
183
-
184
- script_disabled: "{{v}} Script disabled. Script is turned off in store.",
185
- },
186
-
187
- enable: {
188
- help: <<~HELP,
189
- Turn on script in store.
190
- Usage: {{command:%s enable}}
191
- Options:
192
- {{command:--config-props='name1:value1, name2:value2'}} Optional. Define the configuration of your script by passing individual name and value pairs. If used with --config_file, then matching values in --config-props will override those set in the file.
193
- {{command:--config_file=<path/to/YAMLFilename>}} Optional. Define the configuration of your script using a YAML formatted file. --config-props values override properties in this file.
194
- HELP
195
-
196
- info: "{{*}} A script always remains enabled until you disable it - even after pushing "\
197
- "script changes with the same extension point to an app. To disable a script, use "\
198
- "the 'disable' command.",
199
-
200
- error: {
201
- operation_failed: "Can't enable script.",
202
- },
203
-
204
- script_enabled: "{{v}} Script enabled. %{type} script %{title} in app (API key: %{api_key}) "\
205
- "is turned on in store {{green:%{shop_domain}}}",
206
- },
207
-
208
170
  project_deps: {
209
171
  none_required: "{{v}} None required",
210
172
  checking_with_npm: "Checking dependencies with npm",
@@ -217,7 +179,6 @@ module Script
217
179
  select_extension_point: "Which extension point do you want to use?",
218
180
  select_language: "Which language do you want to use?",
219
181
  script_name: "Script Name",
220
- description: "Description",
221
182
  },
222
183
  },
223
184
 
@@ -231,6 +192,15 @@ module Script
231
192
  disabled: "Disabled",
232
193
  enabling: "Enabling",
233
194
  enabled: "Enabled",
195
+ ensure_env: {
196
+ organization: "Partner organization {{green:%s (%s)}}.",
197
+ organization_select: "Which partner organization do you want to use?",
198
+ app: "Script will be pushed to app {{green:%s}}.",
199
+ app_select: "Which app do you want to push this script to?",
200
+ ask_connect_to_existing_script: "The selected app has some scripts. Do you want to replace any of the "\
201
+ "existing scripts with the current script?",
202
+ ask_which_script_to_connect_to: "Which script do you want to replace?",
203
+ },
234
204
  },
235
205
  },
236
206
  }.freeze