@jtff/miztemplate-lib 3.0.0-rc25 → 3.0.0-rc27

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.
@@ -250,7 +250,7 @@ class MizTemplateCI{
250
250
  }
251
251
 
252
252
  async InjectCiScriptsIntoWorkspace(workspacePath) {
253
- fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/ci',workspacePath + '/.workspace/src/nodejs',{recursive: true});
253
+ fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/ci',workspacePath + '/.workspace/src/nodejs',{recursive: true});
254
254
  }
255
255
 
256
256
  async deployCIScriptsFromZipObjectIntoWorkspace(workspacePath, mizObject, mizFilePath) {
package/lib/mizlib.js CHANGED
@@ -43,7 +43,7 @@ class Mizlib {
43
43
  for (let luaScript of luaScriptsArray) {
44
44
  fs.cpSync(
45
45
  [
46
- getInstalledPathSync('@jtff/miztemplate-lib'),
46
+ getInstalledPathSync('@jtff/miztemplate-lib',{local: true}),
47
47
  '/lua/',
48
48
  folderPath,
49
49
  '/',
@@ -114,20 +114,20 @@ class Mizlib {
114
114
  const zipObject = await this.getZipObjectFromMizPath(mizPath);
115
115
  const missionObject = await this.getMissionObjectFromZipObject(zipObject);
116
116
  const strTheatreSettings = missionObject.theatre;
117
- const srcFiles = fs.readdirSync(getInstalledPathSync('@jtff/miztemplate-lib') + "/lua/src",{recursive: true})
117
+ const srcFiles = fs.readdirSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + "/lua/src",{recursive: true})
118
118
  .filter(filename => path.extname(filename).toLowerCase()==='.lua' && !(filename.startsWith('200-')));
119
- const libFiles = fs.readdirSync(getInstalledPathSync('@jtff/miztemplate-lib') + "/lua/lib",{recursive: true})
119
+ const libFiles = fs.readdirSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + "/lua/lib",{recursive: true})
120
120
  .filter(filename => path.extname(filename).toLowerCase()==='.lua');
121
121
  for (let file of srcFiles) {
122
122
  console.log('updating src/' + file + ' from the miztemplate-lib');
123
- fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/lua/src/' + file,
123
+ fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/lua/src/' + file,
124
124
  '.workspace/src/' + file,
125
125
  {force: true}
126
126
  );
127
127
  }
128
128
  for (let file of libFiles) {
129
129
  console.log('updating lib/' + file + ' from the miztemplate-lib');
130
- fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/lua/lib/' + file,
130
+ fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/lua/lib/' + file,
131
131
  '.workspace/lib/' + file,
132
132
  {force: true}
133
133
  );
@@ -351,14 +351,14 @@ class Mizlib {
351
351
  ].join(""), {recursive: true});
352
352
  }
353
353
  if (
354
- fs.existsSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/resources/sounds/' + folderString) &&
355
- fs.lstatSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/resources/sounds/' + folderString).isDirectory()) {
354
+ fs.existsSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/resources/sounds/' + folderString) &&
355
+ fs.lstatSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/resources/sounds/' + folderString).isDirectory()) {
356
356
  fs.mkdirSync([
357
357
  workspacePath,
358
358
  "/.workspace/resources/sounds/",
359
359
  folderString
360
360
  ].join(""), {recursive: true});
361
- fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/resources/sounds/' + folderString,[
361
+ fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/resources/sounds/' + folderString,[
362
362
  workspacePath,
363
363
  "/.workspace/resources/sounds/",
364
364
  folderString
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jtff/miztemplate-lib",
3
- "version": "3.0.0-rc25",
3
+ "version": "3.0.0-rc27",
4
4
  "description": "JTFF mission template library",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -473,7 +473,7 @@ function injectScripts(jtffci, env_mission) {
473
473
  if ((/^y\b|o\b|yes\b|oui\b/i).test(prompt_result.inject_radio_presets)) {
474
474
  // injection des preset radio
475
475
  fs.mkdirSync(workspacePath + '/resources/radios/' + missionObject.theatre,{recursive: true});
476
- fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib') + '/resources/radios/' + missionObject.theatre,workspacePath + '/resources/radios/' + missionObject.theatre,{recursive: true})
476
+ fs.cpSync(getInstalledPathSync('@jtff/miztemplate-lib',{local: true}) + '/resources/radios/' + missionObject.theatre,workspacePath + '/resources/radios/' + missionObject.theatre,{recursive: true})
477
477
  console.log(destinationMizFilePath + ": injecting radio presets declared in resources/radios/" + missionObject.theatre);
478
478
  await jtffci.mizlib.injectRadioPresetsFromFolderIntoZipObject(mizObject, workspacePath + '/resources/radios/' + missionObject.theatre);
479
479
  }
@@ -19,7 +19,7 @@ function templateUpdate(jtffci) {
19
19
  ].join(""),
20
20
  missionTemplate.filename);
21
21
  } else {
22
- await this.mizlib.buildMizFileFromMizTemplate(
22
+ await jtffci.mizlib.buildMizFileFromMizTemplate(
23
23
  [ missionTemplate.prefix,
24
24
  '_',
25
25
  missionTemplate.theatre,