nadesiko3 3.3.78 → 3.3.80

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.
@@ -1,8 +1,8 @@
1
1
  // 実際のバージョン定義 (自動生成されるので以下を編集しない)
2
2
  const nakoVersion = {
3
- version: '3.3.78',
3
+ version: '3.3.80',
4
4
  major: 3,
5
5
  minor: 3,
6
- patch: 78
6
+ patch: 80
7
7
  };
8
8
  export default nakoVersion;
@@ -11,9 +11,9 @@ export interface NakoVersion {
11
11
  }
12
12
  // 実際のバージョン定義 (自動生成されるので以下を編集しない)
13
13
  const nakoVersion: NakoVersion = {
14
- version: '3.3.78',
14
+ version: '3.3.80',
15
15
  major: 3,
16
16
  minor: 3,
17
- patch: 78
17
+ patch: 80
18
18
  }
19
19
  export default nakoVersion
@@ -70,12 +70,11 @@ export default {
70
70
  },
71
71
  'ローカルストレージキー列挙': { // @ブラウザのlocalStorageのキー一覧を返す // @ろーかるすとれーじきーれっきょ
72
72
  type: 'func',
73
- josi: [[]],
73
+ josi: [],
74
74
  pure: true,
75
- fn: function (key) {
75
+ fn: function (sys) {
76
76
  const keys = []
77
77
  for (const key in window.localStorage) { keys.push(key) }
78
-
79
78
  return keys
80
79
  },
81
80
  return_none: false
@@ -138,6 +138,26 @@ export default {
138
138
  },
139
139
  return_none: true
140
140
  },
141
+ 'EUCファイル読': {
142
+ type: 'func',
143
+ josi: [['を', 'から']],
144
+ pure: true,
145
+ fn: function (s, sys) {
146
+ const buf = fs.readFileSync(s);
147
+ const text = iconv.decode(Buffer.from(buf), 'euc-jp');
148
+ return text;
149
+ }
150
+ },
151
+ 'EUCファイル保存': {
152
+ type: 'func',
153
+ josi: [['を'], ['へ', 'に']],
154
+ pure: true,
155
+ fn: function (s, f, sys) {
156
+ const buf = iconv.encode(s, 'euc-jp');
157
+ fs.writeFileSync(f, buf);
158
+ },
159
+ return_none: true
160
+ },
141
161
  '起動待機': {
142
162
  type: 'func',
143
163
  josi: [['を']],
@@ -124,6 +124,26 @@ export default {
124
124
  },
125
125
  return_none: true
126
126
  },
127
+ 'EUCファイル読': { // @euc-jp形式のファイルSを読み込む // @EUCふぁいるよむ
128
+ type: 'func',
129
+ josi: [['を', 'から']],
130
+ pure: true,
131
+ fn: function (s: string, sys: any) {
132
+ const buf = fs.readFileSync(s)
133
+ const text = iconv.decode(Buffer.from(buf), 'euc-jp')
134
+ return text
135
+ }
136
+ },
137
+ 'EUCファイル保存': { // @Sをeuc-jp形式でファイルFへ書き込む // @EUCふぁいるほぞん
138
+ type: 'func',
139
+ josi: [['を'], ['へ', 'に']],
140
+ pure: true,
141
+ fn: function (s: string, f: string, sys: any) {
142
+ const buf = iconv.encode(s, 'euc-jp')
143
+ fs.writeFileSync(f, buf)
144
+ },
145
+ return_none: true
146
+ },
127
147
  '起動待機': { // @シェルコマンドSを起動し実行終了まで待機する // @きどうたいき
128
148
  type: 'func',
129
149
  josi: [['を']],
@@ -189,8 +189,8 @@ const PluginTurtle = {
189
189
  this.ctx.strokeStyle = tt.color
190
190
  break
191
191
  case 'size':
192
- this.ctx.lineWidth = tt.lineWidth
193
192
  tt.lineWidth = m[1]
193
+ this.ctx.lineWidth = tt.lineWidth
194
194
  break
195
195
  case 'penOn':
196
196
  tt.flagDown = m[1]
@@ -93,7 +93,7 @@ describe('plugin_node_test', async () => {
93
93
  }
94
94
  let tmp = '/tmp'
95
95
  if (process.platform === 'linux') {
96
- tmp = fs.mkdtempSync(process.cwd())
96
+ tmp = path.join(os.tmpdir(), 'nadesiko3test')
97
97
  } else {
98
98
  tmp = fs.mkdtempSync(os.tmpdir())
99
99
  }
@@ -113,7 +113,7 @@ describe('plugin_node_test', async () => {
113
113
  try { execSync('which 7z').toString() } catch (e) { return this.skip() }
114
114
  let tmp = '/tmp'
115
115
  if (process.platform === 'linux') {
116
- tmp = fs.mkdtempSync(process.cwd())
116
+ tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'nadesiko3zip-test'))
117
117
  } else {
118
118
  tmp = fs.mkdtempSync(os.tmpdir())
119
119
  }
@@ -130,7 +130,7 @@ describe('plugin_node_test', async () => {
130
130
  }
131
131
  let tmp = '/tmp'
132
132
  if (process.platform === 'linux') {
133
- tmp = fs.mkdtempSync(process.cwd())
133
+ tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'test_nako3zip'))
134
134
  } else {
135
135
  tmp = fs.mkdtempSync(os.tmpdir())
136
136
  }
@@ -162,7 +162,7 @@ describe('plugin_node_test', async () => {
162
162
  }
163
163
  let tmp = '/tmp'
164
164
  if (process.platform === 'linux') {
165
- tmp = fs.mkdtempSync(process.cwd())
165
+ tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'test_nako3zip'))
166
166
  } else {
167
167
  tmp = fs.mkdtempSync(os.tmpdir())
168
168
  }