proscenium 0.3.0-x86_64-linux → 0.4.1-x86_64-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99abd883a1350e998b01ccd263607a8213c9efa13c13e8d691f58841f29fd355
4
- data.tar.gz: 8958a092b13c4ff55ad664f8b37c48061f8ccf1cba5ce4f8a15d2b53c71dc74d
3
+ metadata.gz: 157126f9c1cca9d367a65d0a81bc3c75d0731fe69accc3f617039892a25e7673
4
+ data.tar.gz: 37a2b9d9d8175e7e6d0cd685098645d1a0a478f4d1b23d32eee03ce83e6bc0e5
5
5
  SHA512:
6
- metadata.gz: ebcd43b63938a33ab45d24ac9bbf234a33bf886a6078dd8870d594749a780cb1dfa3dcde4879c83785f8c822bdb9fef9c36fd32ee2bde5b140c90efe2612954b
7
- data.tar.gz: 5520e4305d344a4dd9e6ac09f3c529c4ed37262df1d7dae6ce1f7c6a717b9091985352ed628a5030e6fcf2ff7bcebf84de93205ee07677a67250a13521c8b0ec
6
+ metadata.gz: 9f92e30f9d35d57b698994119b4251e11f0443d94b76d45bda759c84ffbd5a4d79d837853542b22968c3c1f1af899018b5bc9c0f2a0f03a4d5858f048103b402
7
+ data.tar.gz: 8d7b6e3fbfaf405c2ca8984cc5981d7f0b01f48d082a6e214df35347a894da105db6f87fda277e25f107dd44214f0ca6d9b400b0b8d636d528119f9e68a158e0
data/bin/esbuild CHANGED
Binary file
@@ -1,10 +1,13 @@
1
1
  import setup from './setup_plugin.js'
2
2
 
3
+ // Export environment variables as named exports only. You can also import from `env:ENV_VAR_NAME`,
4
+ // which will return the value of the environment variable as the default export. This allows you to
5
+ // safely import a variable regardless of its existence.
3
6
  export default setup('env', () => {
4
7
  return [
5
8
  {
6
9
  type: 'onResolve',
7
- filter: /^env$/,
10
+ filter: /^env(:.+)?$/,
8
11
  callback({ path }) {
9
12
  return { path, namespace: 'env' }
10
13
  }
@@ -14,9 +17,27 @@ export default setup('env', () => {
14
17
  type: 'onLoad',
15
18
  filter: /.*/,
16
19
  namespace: 'env',
17
- callback() {
20
+ callback({ path }) {
21
+ if (path.includes(':')) {
22
+ return {
23
+ loader: 'js',
24
+ contents: `export default '${Deno.env.get(path.split(':')[1])}'`
25
+ }
26
+ }
27
+
18
28
  const env = Deno.env.toObject()
19
- return { loader: 'json', contents: JSON.stringify(env) }
29
+ const contents = []
30
+
31
+ for (const key in env) {
32
+ if (Object.hasOwnProperty.call(env, key)) {
33
+ contents.push(`export const ${key} = '${env[key]}'`)
34
+ }
35
+ }
36
+
37
+ return {
38
+ loader: 'js',
39
+ contents: contents.join(';')
40
+ }
20
41
  }
21
42
  }
22
43
  ]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-28 00:00:00.000000000 Z
11
+ date: 2022-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actioncable