capacitor-standard-version 1.0.2 → 1.0.3

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.
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ (()=>{"use strict";var e={805:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.writeVersion=t.readVersion=void 0,t.readVersion=e=>e.split('versionName "')[1].split('"')[0],t.writeVersion=(e,t)=>{const r=e.replace(/(.*(?:versionName[ \t]+).*)/g,` versionName "${t}"`),n=Number(t.split(".").map((e=>1===e.length?`0${e}`:e)).join(""));return r.replace(/(.*(?:versionCode[ \t]+).*)/g,` versionCode "${n}"`)}},655:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const u=s(r(322)),c=r(597),l=s(r(389)),p=o(r(861)),d={noVerify:!0,tagPrefix:"",releaseCommitMessageFormat:"chore(release): {{currentTag}} [skip ci]",packageFiles:[{filename:"./package.json",type:"json"}],bumpFiles:[{filename:"./android/app/build.gradle",updater:o(r(805))},{filename:"./package.json",type:"json"},{filename:"./package-lock.json",type:"json"},{filename:"./ios/App/App.xcodeproj/project.pbxproj",updater:p}]};!function(){a(this,void 0,void 0,(function*(){try{const e=(0,c.getConfiguration)(),t=(0,l.default)(d,e);yield(0,u.default)(t)}catch(e){throw console.error(e),e}}))}()},861:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.writeVersion=t.readVersion=void 0,t.readVersion=e=>e.match(/MARKETING_VERSION = [0-9]*.[0-9]*.[0-9]*/).toString().split("=")[1].trim(),t.writeVersion=(e,t)=>e.replace(/(.*(?:MARKETING_VERSION[ \t]+).*)/g,` MARKETING_VERSION = "${t}"`).replace(/(.*(?:CURRENT_PROJECT_VERSION[ \t]+).*)/g,` CURRENT_PROJECT_VERSION "${t}"`)},389:e=>{e.exports=require("merge-deep")},322:e=>{e.exports=require("standard-version")},597:e=>{e.exports=require("standard-version/lib/configuration")}},t={};!function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}(655)})();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "capacitor-standard-version",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Default standard-version config for capacitor app",
5
- "main": "index.js",
5
+ "main": "dist/index.js",
6
6
  "bin": {
7
- "capacitor-standard-version": "index.js"
7
+ "capacitor-standard-version": "dist/index.js"
8
8
  },
9
9
  "scripts": {
10
10
  "dev": "set NODE_ENV=development&& npx webpack --config webpack.config.js",
@@ -1,11 +0,0 @@
1
- module.exports.readVersion = function(contents) {
2
- const version = contents.split('versionName "')[1].split('"')[0]
3
- return version
4
- }
5
-
6
- module.exports.writeVersion = function(contents, version) {
7
- const newContent = contents.replace(/(.*(?:versionName[ \t]+).*)/g, ` versionName "${version}"`)
8
- const versionCode = Number(version.split('.').map(v => v.length === 1 ? `0${v}` : v).join(''))
9
- const finalContent = newContent.replace(/(.*(?:versionCode[ \t]+).*)/g, ` versionCode "${versionCode}"`)
10
- return finalContent
11
- }
package/index.js DELETED
@@ -1,47 +0,0 @@
1
- const standardVersion = require('standard-version');
2
- const { getConfiguration } = require('standard-version/lib/configuration');
3
- const merge = require('merge-deep');
4
-
5
- const baseConfig = {
6
- noVerify: true,
7
- tagPrefix: '',
8
- releaseCommitMessageFormat: "chore(release): {{currentTag}} [skip ci]",
9
- packageFiles: [
10
- {
11
- filename: "./package.json",
12
- type: "json"
13
- },
14
- ],
15
- bumpFiles: [
16
- {
17
- filename: "./android/app/build.gradle",
18
- updater: require('./android-version-updater.js')
19
- },
20
- {
21
- filename: "./package.json",
22
- type: "json"
23
- },
24
- {
25
- filename: "./package-lock.json",
26
- type: "json"
27
- },
28
- {
29
- filename: "./ios/App/App.xcodeproj/project.pbxproj",
30
- updater: require('./ios-version-updater.js')
31
- }
32
- ]
33
- }
34
-
35
- async function run() {
36
- try {
37
- const config = getConfiguration();
38
- // merge base config with user config
39
- const finalConfig = merge(baseConfig, config);
40
- await standardVersion(finalConfig);
41
- } catch (error) {
42
- console.error(error);
43
- throw error;
44
- }
45
- }
46
-
47
- run();
@@ -1,11 +0,0 @@
1
- module.exports.readVersion = function(contents) {
2
- const marketingVersionString = contents.match(/MARKETING_VERSION = [0-9]*.[0-9]*.[0-9]*/)
3
- const version = marketingVersionString.toString().split('=')[1].trim()
4
- return version
5
- }
6
-
7
- module.exports.writeVersion = function(contents, version) {
8
- const newContent = contents.replace(/(.*(?:MARKETING_VERSION[ \t]+).*)/g, ` MARKETING_VERSION = "${version}"`)
9
- const finalContent = newContent.replace(/(.*(?:CURRENT_PROJECT_VERSION[ \t]+).*)/g, ` CURRENT_PROJECT_VERSION "${version}"`)
10
- return finalContent
11
- }