@cinerino/sdk 3.22.0 → 3.23.0
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/example/playground/.gcloudignore +17 -0
- package/example/playground/app.js +81 -0
- package/example/playground/package.json +26 -0
- package/example/playground/public/index.html +573 -0
- package/example/playground/public/lib/bundle.js +22897 -0
- package/example/playground/public/signIn.html +18 -0
- package/example/playground/public/signOut.html +15 -0
- package/example/playground/test/app.test.js +15 -0
- package/example/src/person/manageProfile.ts +6 -6
- package/example/src/st/person/getProfile.ts +38 -0
- package/example/src/st/person/searchMyOrders.ts +51 -0
- package/example/src/st/searchMovies.ts +52 -0
- package/example/src/st/searchScreeningEventSeries.ts +54 -0
- package/lib/auth/oAuth2client.js +2 -2
- package/lib/bundle.js +22 -2
- package/package.json +3 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This file specifies files that are *not* uploaded to Google Cloud Platform
|
|
2
|
+
# using gcloud. It follows the same syntax as .gitignore, with the addition of
|
|
3
|
+
# "#!include" directives (which insert the entries of the given .gitignore-style
|
|
4
|
+
# file at that point).
|
|
5
|
+
#
|
|
6
|
+
# For more information, run:
|
|
7
|
+
# $ gcloud topic gcloudignore
|
|
8
|
+
#
|
|
9
|
+
.gcloudignore
|
|
10
|
+
# If you would like to upload your .git directory, .gitignore file or files
|
|
11
|
+
# from your .gitignore file, remove the corresponding line
|
|
12
|
+
# below:
|
|
13
|
+
.git
|
|
14
|
+
.gitignore
|
|
15
|
+
|
|
16
|
+
# Node.js dependencies:
|
|
17
|
+
node_modules/
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Copyright 2017 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
// [START gae_node_request_example]
|
|
18
|
+
const express = require('express');
|
|
19
|
+
|
|
20
|
+
const app = express();
|
|
21
|
+
|
|
22
|
+
app.get('/', (req, res) => {
|
|
23
|
+
// res.status(200)
|
|
24
|
+
// .send('Hello, world!')
|
|
25
|
+
// .end();
|
|
26
|
+
|
|
27
|
+
res.sendFile(`${__dirname}/public/index.html`);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
app.get('/lib/bundle.js', (req, res) => {
|
|
31
|
+
// res.status(200)
|
|
32
|
+
// .send('Hello, world!')
|
|
33
|
+
// .end();
|
|
34
|
+
|
|
35
|
+
res.sendFile(`${__dirname}/public/lib/bundle.js`);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
app.get('/signIn', (req, res) => {
|
|
39
|
+
// res.status(200)
|
|
40
|
+
// .send('Hello, world!')
|
|
41
|
+
// .end();
|
|
42
|
+
|
|
43
|
+
res.sendFile(`${__dirname}/public/signIn.html`);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
app.get('/signOut', (req, res) => {
|
|
47
|
+
// res.status(200)
|
|
48
|
+
// .send('Hello, world!')
|
|
49
|
+
// .end();
|
|
50
|
+
|
|
51
|
+
res.sendFile(`${__dirname}/public/signOut.html`);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
app.get('/settings', (req, res) => {
|
|
55
|
+
// res.status(200)
|
|
56
|
+
// .send('Hello, world!')
|
|
57
|
+
// .end();
|
|
58
|
+
const protocol = (typeof process.env.PROTOCOL === 'string') ? process.env.PROTOCOL : req.protocol;
|
|
59
|
+
const endpoint = `${protocol}://${req.get('host')}`;
|
|
60
|
+
console.log('endpoint:', endpoint);
|
|
61
|
+
|
|
62
|
+
res.json({
|
|
63
|
+
PROJECT_ID: process.env.PLAYGROUND_PROJECT_ID,
|
|
64
|
+
DOMAIN: process.env.PLAYGROUND_AUTHORIZE_SERVER_DOMAIN,
|
|
65
|
+
CLIENT_ID: process.env.PLAYGROUND_CLIENT_ID,
|
|
66
|
+
CALLBACK_URL: `${endpoint}/signIn`,
|
|
67
|
+
LOGOUT_URL: `${endpoint}/signOut`,
|
|
68
|
+
ISSUER: process.env.PLAYGROUND_ISSUER,
|
|
69
|
+
API_ENDPOINT: process.env.API_ENDPOINT,
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// Start the server
|
|
74
|
+
const PORT = process.env.PORT || 8080;
|
|
75
|
+
app.listen(PORT, () => {
|
|
76
|
+
console.log(`App listening on port ${PORT}`);
|
|
77
|
+
console.log('Press Ctrl+C to quit.');
|
|
78
|
+
});
|
|
79
|
+
// [END gae_node_request_example]
|
|
80
|
+
|
|
81
|
+
module.exports = app;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "appengine-hello-world",
|
|
3
|
+
"description": "Simple Hello World Node.js sample for Google App Engine Standard Environment.",
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"private": true,
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": "Google Inc.",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=14.0.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"start": "node app.js",
|
|
17
|
+
"test": "mocha --exit test/*.test.js"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"express": "^4.17.1"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"mocha": "^8.1.3",
|
|
24
|
+
"supertest": "^6.0.0"
|
|
25
|
+
}
|
|
26
|
+
}
|