@staffbase/create-staffbase-plugin 1.0.1 → 1.0.6

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/.eslintrc CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "@staffbase/eslint-config-staffbase",
2
+ "extends": "@staffbase/eslint-config",
3
3
  "parserOptions": {
4
4
  "ecmaVersion": 6
5
5
  },
@@ -0,0 +1,9 @@
1
+ # Shared
2
+ .github/CODEOWNERS @Staffbase/cc-tech
3
+
4
+ # Global
5
+ * @maximizeIT
6
+
7
+ # Misc
8
+ package.json @maximizeIT @Staffbot
9
+ yarn.lock @maximizeIT @Staffbot
@@ -0,0 +1,52 @@
1
+ version: 2
2
+ registries:
3
+ npm-github:
4
+ type: npm-registry
5
+ url: https://npm.pkg.github.com
6
+ token: ${{secrets.STAFFBOT_NPM_READ}}
7
+ updates:
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
12
+ time: "08:00"
13
+ timezone: "Europe/Berlin"
14
+ target-branch: "master"
15
+ open-pull-requests-limit: 10
16
+ labels:
17
+ - "github dependency"
18
+ reviewers:
19
+ - "maximizeIT"
20
+ commit-message:
21
+ prefix: chore(deps)
22
+ groups:
23
+ ga-dependencies:
24
+ patterns:
25
+ - "*"
26
+ update-types:
27
+ - "minor"
28
+ - "patch"
29
+
30
+ - package-ecosystem: "npm"
31
+ directory: "/"
32
+ schedule:
33
+ interval: "daily"
34
+ time: "08:00"
35
+ timezone: "Europe/Berlin"
36
+ target-branch: "master"
37
+ open-pull-requests-limit: 10
38
+ labels:
39
+ - "npm dependency"
40
+ reviewers:
41
+ - "maximizeIT"
42
+ registries:
43
+ - npm-github
44
+ commit-message:
45
+ prefix: chore(deps)
46
+ groups:
47
+ npm-dependencies:
48
+ patterns:
49
+ - "*"
50
+ update-types:
51
+ - "minor"
52
+ - "patch"
@@ -0,0 +1,10 @@
1
+ name: Enable Dependabot Auto-Merge
2
+
3
+ on: pull_request
4
+
5
+ jobs:
6
+ dependabot:
7
+ uses: Staffbase/gha-workflows/.github/workflows/template_automerge_dependabot.yml@v4.0.2
8
+ secrets:
9
+ app_id: ${{ vars.STAFFBASE_ACTIONS_APP_ID }}
10
+ private_key: ${{ secrets.STAFFBASE_ACTIONS_PRIVATE_KEY }}
package/README.MD CHANGED
@@ -1,5 +1,3 @@
1
- [![Build Status](https://travis-ci.org/Staffbase/create-staffbase-plugin-nodejs.svg?branch=master)](https://travis-ci.org/Staffbase/create-staffbase-plugin-nodejs) [![Greenkeeper badge](https://badges.greenkeeper.io/Staffbase/create-staffbase-plugin-nodejs.svg)](https://greenkeeper.io/)
2
-
3
1
  # Create-Staffbase-SSO-CLI Documentation
4
2
  ![Staffbase Logo](https://staffbase.com/wp-content/themes/staffbase-theme/img/logo-blau.svg)
5
3
  ## Getting started
@@ -58,11 +56,12 @@ app.js
58
56
  You can also specify these values using environment variables.
59
57
  Refer to the table to see which environment variables can be used.
60
58
 
61
- | *Value* | *Environment Variable* |
62
- |:------------|:--------------------------: |
63
- |Secret |STAFFBASE_SSO_SECRET |
64
- |Audience |STAFFBASE_SSO_AUDIENCE |
65
- |Server Port |PORT |
59
+ | *Value* | *Environment Variable* | *Default if not set* |
60
+ |:--------------|:--------------------------: |:----------------------------------------:|
61
+ |Secret |STAFFBASE_SSO_SECRET | *(empty)* |
62
+ |Audience |STAFFBASE_SSO_AUDIENCE | *(empty)* |
63
+ |Server Port |PORT | 3000 |
64
+ |Server Address |ADDRESS | *(empty, listening on all IP addresses)* |
66
65
 
67
66
  ## Running the server
68
67
  _create-staffbase-plugin_ installs the project dependencies for you.
@@ -72,3 +71,22 @@ folder where your app was generated and start the express server.
72
71
  $ cd [path of generated app]
73
72
  $ npm start
74
73
  ```
74
+
75
+ ## License
76
+
77
+ Copyright 2017-2024 Staffbase GmbH.
78
+
79
+ Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0
80
+
81
+ <table>
82
+ <tr>
83
+ <td>
84
+ <img src="docs/assets/images/staffbase.png" alt="Staffbase GmbH" width="96" />
85
+ </td>
86
+ <td>
87
+ <b>Staffbase GmbH</b>
88
+ <br />Staffbase is an internal communications platform built to revolutionize the way you work and unite your company. Staffbase is hiring: <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">jobs.staffbase.com</a>
89
+ <br /><a href="https://github.com/Staffbase" target="_blank" rel="noreferrer">GitHub</a> | <a href="https://staffbase.com/" target="_blank" rel="noreferrer">Website</a> | <a href="https://jobs.staffbase.com" target="_blank" rel="noreferrer">Jobs</a>
90
+ </td>
91
+ </tr>
92
+ </table>
package/csss.js CHANGED
@@ -26,7 +26,7 @@ yargv
26
26
  .version('0.0.1')
27
27
  .help('help')
28
28
  .epilogue(`for more information,\please see the README at:
29
- http://www.github.com/Staffbase/create-staffbase-sso-server/master/README.MD`);
29
+ https://github.com/Staffbase/create-staffbase-plugin-nodejs/blob/master/README.MD`);
30
30
  // console.log('YARGS Parsed Data:\n', yargv.argv);
31
31
  const packageJSON = fs.readJSONSync(path.join(scaffoldFolder, 'package.json'));
32
32
  // Defaults package name to current folder name
Binary file
package/package.json CHANGED
@@ -1,20 +1,12 @@
1
1
  {
2
2
  "name": "@staffbase/create-staffbase-plugin",
3
- "version": "1.0.1",
4
- "bin": "./csss.js",
5
- "dependencies": {
6
- "colors": "^1.4.0",
7
- "filepath": "^1.1.0",
8
- "fs-extra": "^9.0.0",
9
- "is-relative": "^1.0.0",
10
- "is-valid-path": "^0.1.1",
11
- "prompt": "^1.0.0",
12
- "validate-npm-package-name": "^3.0.0",
13
- "yargs": "^15.3.1"
3
+ "version": "1.0.6",
4
+ "bin": {
5
+ "create-staffbase-plugin": "csss.js"
14
6
  },
15
7
  "repository": {
16
8
  "type": "git",
17
- "url": "https://github.com/Staffbase/create-staffbase-plugin-nodejs"
9
+ "url": "git+https://github.com/Staffbase/create-staffbase-plugin-nodejs.git"
18
10
  },
19
11
  "scripts": {
20
12
  "test": "jest",
@@ -26,14 +18,34 @@
26
18
  "parse-numbers": true,
27
19
  "boolean-negation": true
28
20
  },
21
+ "dependencies": {
22
+ "colors": "^1.4.0",
23
+ "filepath": "^1.1.0",
24
+ "fs-extra": "^9.0.0",
25
+ "is-relative": "^1.0.0",
26
+ "is-valid-path": "^0.1.1",
27
+ "prompt": "^1.0.0",
28
+ "validate-npm-package-name": "^3.0.0",
29
+ "yargs": "^15.3.1"
30
+ },
29
31
  "devDependencies": {
30
- "@staffbase/eslint-config-staffbase": "^1.0.0",
31
- "eslint": "^7.0.0",
32
+ "@babel/core": "^7.20.12",
33
+ "@babel/eslint-parser": "^7.0.0",
34
+ "@emotion/eslint-plugin": "^11.0.0",
35
+ "@typescript-eslint/eslint-plugin": "^5.50.0",
36
+ "@typescript-eslint/parser": "^5.50.0",
37
+ "eslint": "^8.33.0",
38
+ "eslint-config-prettier": "^8.6.0",
39
+ "eslint-plugin-react": "^7.32.2",
40
+ "eslint-plugin-import-helpers": "^1.1.0",
41
+ "eslint-plugin-react-hooks": "^4.6.0",
42
+ "eslint-plugin-simple-import-sort": "^10.0.0",
32
43
  "eslint-config-google": "^0.14.0",
33
44
  "highlight.js": "^10.0.3",
34
45
  "husky": "^4.2.5",
35
46
  "jest": "^26.0.1",
36
- "markdown-it": "^10.0.0",
37
- "marked": "^1.0.0"
47
+ "markdown-it": "^12.3.2",
48
+ "marked": "^4.0.10",
49
+ "typescript": "^4.9.5"
38
50
  }
39
51
  }
@@ -48,5 +48,5 @@ $ npm start
48
48
  ## Further Reading
49
49
  For getting more information about Staffbase SSO, please check out the following links:
50
50
 
51
- - [About Staffbase Plugin SSO](http://developers.staffbase.com/api/plugin-sso/)
52
- - [Staffbase Nodejs Plugin Documentation](www.github.com/staffbase/plugins-sdk-nodejs/master/README.MD)
51
+ - [Developer Portal: Custom Plugins](https://developers.staffbase.com/concepts/customplugin-overview/)
52
+ - [Staffbase Plugins SDK for Node.js](https://github.com/Staffbase/plugins-sdk-nodejs/blob/master/README.MD)
@@ -9,11 +9,13 @@ var debug = require('debug')('ssosampleserver:server');
9
9
  var http = require('http');
10
10
 
11
11
  /**
12
- * Get port from environment and store in Express.
12
+ * Get port and listen address from environment and store in Express.
13
13
  */
14
14
 
15
15
  var port = normalizePort(process.env.PORT || '3000');
16
+ var address = process.env.ADDRESS || '';
16
17
  app.set('port', port);
18
+ app.set('address', port);
17
19
 
18
20
  /**
19
21
  * Create HTTP server.
@@ -22,10 +24,10 @@ app.set('port', port);
22
24
  var server = http.createServer(app);
23
25
 
24
26
  /**
25
- * Listen on provided port, on all network interfaces.
27
+ * Listen on provided port and network address.
26
28
  */
27
29
 
28
- server.listen(port, '127.0.0.1');
30
+ server.listen(port, address);
29
31
  server.on('error', onError);
30
32
  server.on('listening', onListening);
31
33